This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-01-09 18:14:28 -07:00
21 changed files with 5626 additions and 5146 deletions

View File

@@ -1581,6 +1581,22 @@ Public Class ClsClientes
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 2627;") Then
Alert("El Nuevo Cliente no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
ElseIf Ex1.Message.Contains("Número: 2601;") Then
If Ex1.Message.Contains("UN_ClientesRFCEmpresa") Then
Alert("Ya existe un cliente registrado con el mismo RFC.", TipoMensaje.MsgAdvertencia)
End If
If Ex1.Message.Contains("IND_Clientes_Codigo") Then
Alert("Ya existe un cliente registrado con el mismo Código.", TipoMensaje.MsgAdvertencia)
End If
Else
Me.OnError("Ocurrió un error al Intentar guardar el Nuevo Cliente.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
Catch ex As Exception
OnError("Ocurrió un error al agregar el cliente", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try

View File

@@ -613,6 +613,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
params.Add(New ReportParameter("SaldoFinalLibros", SaldoFinalLibros.FormatoNumero))
Dim SaldoFinalContabilidad As Double = 0
Dim SaldoFinalContabilidadComplementaria As Double = 0
If DdlCuenta.SelectedValue.ToEntero > 0 Then
Dim CveCuenta As Integer = 0
Dim CveCuentaComplementaria As Integer = 0
@@ -636,7 +637,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
If CveCuentaComplementaria > 0 Then
If ObjConta.GetMovimientosAuxiliaresCatalogo(CveCuentaComplementaria, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, CveMoneda, "-1", UsuarioActual.CveEmpresa, "1") Then
If ObjConta.DtResultados.Rows.Count > 1 Then
SaldoFinalContabilidad += ObjConta.DtResultados.Rows(1)("SaldoActual").ToString.ToDouble
SaldoFinalContabilidadComplementaria = ObjConta.DtResultados.Rows(1)("SaldoActual").ToString.ToDouble
End If
End If
End If
@@ -644,6 +645,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
End If
params.Add(New ReportParameter("SaldoFinalContabilidad", (SaldoFinalContabilidad.FormatoNumero)))
params.Add(New ReportParameter("SaldoFinalContabilidadComplementaria", (SaldoFinalContabilidadComplementaria.FormatoNumero)))
params.Add(New ReportParameter("Diferencia", (SaldoFinalLibros - SaldoFinalContabilidad).FormatoNumero))
If Imagen.Exists Then

View File

@@ -315,6 +315,8 @@ Partial Class Bancos_FluctuacionCambiaria
Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad
Conta.IniciaTransacSQL()
Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa)
ObjContPaq.IniciaTransacSQL()
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/Fluctua", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim idCta As Integer = 0
Dim CveCuenta As Integer = 0
@@ -372,8 +374,19 @@ Partial Class Bancos_FluctuacionCambiaria
End If
Next
Dim SeContabilizo As Boolean = False
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
If AutoConta Then
If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
SeContabilizo = True
Else
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
End If
End If
If Not ErrorRegistrar And SeContabilizo Then
If Not ErrorRegistrar Then
Conta.Commit()
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
CargaDatosCuentas()
@@ -465,6 +478,8 @@ Partial Class Bancos_FluctuacionCambiaria
Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa)
ObjContPaq.IniciaTransacSQL()
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaFilial", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Filiales", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim idCta As Integer = 0
Dim CveCuenta As Integer = 0
@@ -524,13 +539,29 @@ Partial Class Bancos_FluctuacionCambiaria
Next
If Not ErrorRegistrar Then
'Inicio auto conta
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
If AutoConta Then
If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
Else
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
End If
End If
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
'Fin autoconta
Conta.Commit()
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
Else
Conta.RollBack()
ObjContPaq.RollBack()
End If
Conta.Dispose()
Banco.Dispose()
ObjContPaq.Dispose()
End Sub
#End Region

View File

@@ -2322,7 +2322,9 @@ Partial Class Bancos_IE
ElseIf CveProveedor > 0 Then
CveConceptoCompra = 21 'Pago a Proveedor/CAncelacion Anticipos
CveConceptoContable = 30 'Bancos
CvePlantillaPoliza = 7
CvePlantillaPoliza = 7
ElseIf CveCliente > 0 Then
CvePlantillaPoliza = 11
End If
End If

View File

@@ -1556,6 +1556,7 @@ Partial Class Bancos_PopIEVentas
Select Case ConceptoContable
Case 2 'Pago Cliente
If RBLContado.SelectedValue.Contiene("3", "4", "5") Then
'If CveMonedaVenta > 1 Then ConceptoContable = 292
For Each rw As GridViewRow In GvIngresos.Rows
If rw.FCCheckBox("Chk").Checked Then
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then

View File

@@ -827,7 +827,7 @@ Partial Class Bancos_ProveedoresAbonar
'cheque
If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = TxtFolio.Text.ToEntero
If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa.Contiene(13, 83) Then FolioFijo = TxtFolio.Text.ToEntero
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/ProveedoresAbonar", 2, ImporteSeleccionado, ImporteSeleccionado, GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa))

View File

@@ -19094,7 +19094,7 @@ Partial Class Compras_Compras
Dim ObjPS As New ClsProductosServicios
If ObjPS.AddPSSimplificado(PS) > 0 Then
Alert("El P/S fue agregado correctamente.")
RecargaGlobalEquivalencias()
GeneraGlobalDT(Nothing)
End If
ObjPS.Dispose()
@@ -19106,18 +19106,11 @@ Partial Class Compras_Compras
UpAgregarPS.Update()
RegistraScript("$('#DivAgregarPS').modal('hide');")
RecargaPSGlobal()
End Sub
Private Sub RecargaPSGlobal()
'GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
'Dim ObjPS As New ClsProductosServicios
RegistraScript("$('#DivAgregarPS').modal('hide');")
'If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable()
'ObjPS.Dispose()
End Sub
#End Region
#Region "TIPO DE COMPRA"

View File

@@ -0,0 +1,137 @@
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatClasificacionPorcentaje.aspx.vb" Inherits="Contabilidad_CatClasificacionPorcentaje" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Catálogo de Clasificacion Porcentaje
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAgregar">
<ContentTemplate>
<li>
<asp:LinkButton runat="server" ID="BtnAgregarClas" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Clas. Porcentaje"></asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveClasificacionPorcentaje,Clasificacion,CveEmpresa,CveClasificacion,PorcentajeIVA,
CuentaXAcreditar,CuentaAcreditable,CuentaXTrasladar,CuentaTrasladado,IdCtaIVAXAcreditar,IdCtaIVAAcreditable,IdCtaIVAXTrasladar,IdCtaIVATrasladado,IdCtaIVANoAcreditable"
EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Motivo de Baja" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;
text-align: center; width: 100%" GridLines="None">
<Columns>
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificacion" />
<asp:BoundField DataField="PorcentajeIVA" HeaderText="PorcentajeIVA" />
<asp:BoundField DataField="CuentaXAcreditar" HeaderText="C. Por Acreditar" />
<asp:BoundField DataField="CuentaAcreditable" HeaderText="C. Acreditable" />
<asp:BoundField DataField="CuentaXTrasladar" HeaderText="C. Por trasladar" />
<asp:BoundField DataField="CuentaTrasladado" HeaderText="C. Trasladado" />
<%--<asp:BoundField DataField="IdCtaIVANoAcreditable" HeaderText="IdCtaIVANoAcreditable" />--%>
<asp:TemplateField HeaderText="Editar">
<EditItemTemplate>
<center>
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
&nbsp;<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
</center>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="imgE" runat="server" OnClick="GvDatos_RowEditing" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
<div id="DivAgregarTiposD" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Clasificación porcentaje</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:dropdownlist runat="server" ID="DdlClasificaciones" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" AppendDataBoundItems="true" Width="100%" DataTextField="Clasificacion" DataValueField="CveClasificacion"></asp:dropdownlist>
<asp:RequiredFieldValidator ID="RfvDdlClasificaciones" runat="server" ControlToValidate="DdlClasificaciones" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<label for="MotivoTxt">Clasificación:</label>
<i></i>
</div>
<br />
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPorcentajeIva" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TxtPorcentajeIva" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<label for="TxtPorcentajeIva">Porcentaje IVA:</label>
<i></i>
</div>
<br />
<div class="form-group form-md-line-input input-iconright">
<asp:dropdownlist runat="server" ID="DdlIdCtaIVAXAcreditar" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" AppendDataBoundItems="true" Width="100%" DataTextField="Nombre" DataValueField="Id"></asp:dropdownlist>
<asp:RequiredFieldValidator ID="RfvDdlIdCtaIVAXAcreditar" runat="server" ControlToValidate="DdlIdCtaIVAXAcreditar" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<label for="DdlIdCtaIVAXAcreditar">Cuenta IVA por acreditar:</label>
<i></i>
</div>
<br />
<div class="form-group form-md-line-input input-iconright">
<asp:dropdownlist runat="server" ID="DdlIdCtaIVAAcreditable" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" AppendDataBoundItems="true" Width="100%" DataTextField="Nombre" DataValueField="Id"></asp:dropdownlist>
<asp:RequiredFieldValidator ID="RfvDdlIdCtaIVAAcreditable" runat="server" ControlToValidate="DdlIdCtaIVAAcreditable" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<label for="DdlIdCtaIVAAcreditable">Cuenta IVA acreditable:</label>
<i></i>
</div>
<br />
<div class="form-group form-md-line-input input-iconright">
<asp:dropdownlist runat="server" ID="DdlIdCtaIVAXTrasladar" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" AppendDataBoundItems="true" Width="100%" DataTextField="Nombre" DataValueField="Id"></asp:dropdownlist>
<asp:RequiredFieldValidator ID="RfvDdlIdCtaIVAXTrasladar" runat="server" ControlToValidate="DdlIdCtaIVAXTrasladar" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<label for="DdlIdCtaIVAXTrasladar">Cuenta IVA por trasladar:</label>
<i></i>
</div>
<br />
<div class="form-group form-md-line-input input-iconright">
<asp:dropdownlist runat="server" ID="DdlIdCtaIVATrasladado" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" AppendDataBoundItems="true" Width="100%" DataTextField="Nombre" DataValueField="Id"></asp:dropdownlist>
<asp:RequiredFieldValidator ID="RfvDdlIdCtaIVATrasladado" runat="server" ControlToValidate="DdlIdCtaIVATrasladado" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<label for="DdlIdCtaIVATrasladado">Cuenta IVA Traslado:</label>
<i></i>
</div>
<br />
<div class="form-group form-md-line-input input-iconright">
<asp:dropdownlist runat="server" ID="DdlIdCtaIVANoAcreditable" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" AppendDataBoundItems="true" Width="100%" DataTextField="Nombre" DataValueField="Id"></asp:dropdownlist>
<asp:RequiredFieldValidator ID="RfvDdlIdCtaIVANoAcreditable" runat="server" ControlToValidate="DdlIdCtaIVANoAcreditable" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<label for="DdlIdCtaIVANoAcreditable">Cuenta IVA no acreditable:</label>
<i></i>
</div>
<br />
</div>
<br />
<div class="modal-footer">
<asp:Button ID="BtnAgregarTiposDModal" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
<asp:Button ID="BtnEditarTiposDModal" runat="server" class="btn btn-success" Text="Confirmar" ValidationGroup="GrpTiposD" />
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,150 @@
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class Contabilidad_CatClasificacionPorcentaje
Inherits ClsPaginas
Private Property DtClasificacionPorcentaje As DataTable
Get
Return CType(ViewState("DtClasificacionPorcentaje"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtClasificacionPorcentaje") = value
End Set
End Property
Private Property CveClasificacion As Integer
Get
Return CType(ViewState("CveClasificacion"), Integer)
End Get
Set(value As Integer)
ViewState("CveClasificacion") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaDatos()
CargaContPaq()
End If
End Sub
Protected Sub CargaDatos()
Dim ObjGenerales As New ClsGenerales
If ObjGenerales.GetClasificacionPorcentaje(UsuarioActual.CveEmpresa, CveClasificacionPorcentaje:=-1, CveClasificacion:=-1, PorcentajeIVA:=-1, Opcion:=2) Then
GvDatos.DataSource = ObjGenerales.DtResultados
DtClasificacionPorcentaje = ObjGenerales.DtResultados
End If
ObjGenerales.Dispose()
GvDatos.DataBind()
DdlClasificaciones.Items.Add(New ListItem("Seleccione", "-1"))
DdlClasificaciones.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlClasificaciones.DataBind()
End Sub
Protected Sub CargaContPaq()
Dim Empresa As DataTable = GlobalDTEmpresas(UsuarioActual.CveEmpresa)
Dim Servidor As String = Empresa.FiltroPrimeroValor("ServerContPAQi")
Dim BD As String = Empresa.FiltroPrimeroValor("BDContPAQi")
Dim Usuario As String = Empresa.FiltroPrimeroValor("UsrContPAQi")
Dim Contra As String = Empresa.FiltroPrimeroValor("PwdContPAQi")
Dim ObjPaq As New ClsContPAQi(Servidor, BD, Usuario, Contra)
DdlIdCtaIVAXAcreditar.Items.Add(New ListItem("Seleccione una cuenta", "-1"))
DdlIdCtaIVAAcreditable.Items.Add(New ListItem("Seleccione una cuenta", "-1"))
DdlIdCtaIVAXTrasladar.Items.Add(New ListItem("Seleccione una cuenta", "-1"))
DdlIdCtaIVATrasladado.Items.Add(New ListItem("Seleccione una cuenta", "-1"))
DdlIdCtaIVANoAcreditable.Items.Add(New ListItem("Seleccione una cuenta", "-1"))
If ObjPaq.GetCuentas(-1, "-1", -1, IdPadre:=-1) Then
DdlIdCtaIVAXAcreditar.DataSource = ObjPaq.DtResultados
DdlIdCtaIVAAcreditable.DataSource = ObjPaq.DtResultados
DdlIdCtaIVAXTrasladar.DataSource = ObjPaq.DtResultados
DdlIdCtaIVATrasladado.DataSource = ObjPaq.DtResultados
DdlIdCtaIVANoAcreditable.DataSource = ObjPaq.DtResultados
End If
ObjPaq.Dispose()
DdlIdCtaIVAXAcreditar.DataBind()
DdlIdCtaIVAAcreditable.DataBind()
DdlIdCtaIVAXTrasladar.DataBind()
DdlIdCtaIVATrasladado.DataBind()
DdlIdCtaIVANoAcreditable.DataBind()
End Sub
Protected Sub BtnAgregarMotivo_Click(sender As Object, e As EventArgs) Handles BtnAgregarClas.Click
BtnAgregarTiposDModal.Text = "Agregar"
BtnEditarTiposDModal.Visible = False
BtnAgregarTiposDModal.Visible = True
TxtPorcentajeIva.Text = ""
UpModalTiposD.Update()
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarTiposDModal.Click 'esta funcion es la que agrega un nuevo motivo de baja se activa con el boton "Agregar" de la ventana modal"
Dim ObjGenerales As New ClsGenerales
If BtnAgregarTiposDModal.Text = "Agregar" Then
If ObjGenerales.AddClasificacionPorcentaje(DdlClasificaciones.SelectedValue, TxtPorcentajeIva.Text.ToDouble, DdlIdCtaIVAXAcreditar.SelectedValue, DdlIdCtaIVAAcreditable.SelectedValue,
DdlIdCtaIVAXTrasladar.SelectedValue, DdlIdCtaIVATrasladado.SelectedValue, UsuarioActual.CveEmpresa) Then
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
Alert("Clasificación porcentaje agregado correctamente")
If ObjGenerales.GetClasificacionPorcentaje(-1) Then
GlobalDTClasificacionPorcentaje(-1) = ObjGenerales.DtResultados
End If
CargaDatos()
CargaContPaq()
UpDatos.Update()
End If
ElseIf BtnAgregarTiposDModal.Text = "Actualizar" Then
If ObjGenerales.UpdateClasificacionPorcentaje(CveClasificacion, DdlClasificaciones.SelectedValue, TxtPorcentajeIva.Text.ToDouble, DdlIdCtaIVAXAcreditar.SelectedValue,
DdlIdCtaIVAAcreditable.SelectedValue, DdlIdCtaIVAXTrasladar.SelectedValue, DdlIdCtaIVATrasladado.SelectedValue) Then
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
Alert("Clasificación porcentaje actualizado correctamente")
If ObjGenerales.GetClasificacionPorcentaje(-1) Then
GlobalDTClasificacionPorcentaje(-1) = ObjGenerales.DtResultados
End If
CargaDatos()
CargaContPaq()
UpDatos.Update()
End If
End If
ObjGenerales.Dispose()
End Sub
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
Dim objgenerales As New ClsGenerales
If objgenerales.RemoveClasificacionPorcentaje(GvDatos.DataKeys(e.RowIndex).Value.ToString) Then
Alert("la clasificación porcentaje se eliminó correctamente")
If objgenerales.GetClasificacionPorcentaje(-1) Then
GlobalDTClasificacionPorcentaje(-1) = objgenerales.DtResultados
End If
CargaDatos()
CargaContPaq()
UpDatos.Update()
End If
objgenerales.Dispose()
End Sub
Public Sub GvDatos_RowEditing(sender As Object, e As EventArgs)
BtnAgregarTiposDModal.Text = "Actualizar"
Dim renglon As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
DdlClasificaciones.SelectedValue = If(renglon.DataKey("CveClasificacion").ToString IsNot "", renglon.DataKey("CveClasificacion"), "-1")
TxtPorcentajeIva.Text = renglon.DataKey("PorcentajeIVA")
DdlIdCtaIVAXAcreditar.SelectedValue = If(renglon.DataKey("IdCtaIVAXAcreditar").ToString IsNot "", renglon.DataKey("IdCtaIVAXAcreditar"), "-1")
DdlIdCtaIVAAcreditable.SelectedValue = If(renglon.DataKey("IdCtaIVAAcreditable").ToString IsNot "", renglon.DataKey("IdCtaIVAAcreditable"), "-1")
DdlIdCtaIVAXTrasladar.SelectedValue = If(renglon.DataKey("IdCtaIVAXTrasladar").ToString IsNot "", renglon.DataKey("IdCtaIVAXTrasladar"), "-1")
DdlIdCtaIVATrasladado.SelectedValue = If(renglon.DataKey("IdCtaIVATrasladado").ToString IsNot "", renglon.DataKey("IdCtaIVATrasladado"), "-1")
DdlIdCtaIVANoAcreditable.SelectedValue = If(renglon.DataKey("IdCtaIVANoAcreditable").ToString IsNot "", renglon.DataKey("IdCtaIVANoAcreditable"), "-1")
BtnEditarTiposDModal.Visible = False
BtnAgregarTiposDModal.Visible = True
UpModalTiposD.Update()
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))
End Sub
End Class

View File

@@ -23,9 +23,9 @@
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>1.37762in</Top>
<Left>5.662in</Left>
<Left>5.81465in</Left>
<Height>0.5cm</Height>
<Width>2.24597in</Width>
<Width>2.09332in</Width>
<Style>
<Border>
<Style>Solid</Style>
@@ -73,9 +73,9 @@
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>0.93484in</Top>
<Left>5.662in</Left>
<Left>5.81465in</Left>
<Height>0.5cm</Height>
<Width>2.24597in</Width>
<Width>2.09332in</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
@@ -108,9 +108,9 @@
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>0.69525in</Top>
<Left>5.662in</Left>
<Left>5.81465in</Left>
<Height>0.60856cm</Height>
<Width>2.24597in</Width>
<Width>2.09332in</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
@@ -143,9 +143,9 @@
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>1.23676cm</Top>
<Left>5.662in</Left>
<Left>5.81465in</Left>
<Height>0.5cm</Height>
<Width>2.24597in</Width>
<Width>2.09332in</Width>
<ZIndex>3</ZIndex>
<Style>
<Border>
@@ -259,9 +259,9 @@
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>1.13169in</Top>
<Left>5.662in</Left>
<Left>5.81465in</Left>
<Height>0.25114in</Height>
<Width>2.24597in</Width>
<Width>2.09332in</Width>
<ZIndex>6</ZIndex>
<Style>
<Border>
@@ -295,9 +295,9 @@
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>1.57434in</Top>
<Left>5.662in</Left>
<Left>5.81465in</Left>
<Height>0.25635in</Height>
<Width>2.24597in</Width>
<Width>2.09332in</Width>
<ZIndex>7</ZIndex>
<Style>
<Border>
@@ -347,10 +347,10 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox10</rd:DefaultName>
<Top>0.98172in</Top>
<Left>1.48781in</Left>
<Height>0.65513in</Height>
<Width>2.06754in</Width>
<Top>0.99561in</Top>
<Left>0.05904in</Left>
<Height>0.62735in</Height>
<Width>1.9981in</Width>
<ZIndex>8</ZIndex>
<Style>
<Border>
@@ -397,10 +397,10 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox10</rd:DefaultName>
<Top>0.98172in</Top>
<Left>3.64748in</Left>
<Height>0.65513in</Height>
<Width>1.93674in</Width>
<Top>1.00949in</Top>
<Left>2.05714in</Left>
<Height>0.62735in</Height>
<Width>1.76588in</Width>
<ZIndex>9</ZIndex>
<Style>
<Border>
@@ -963,7 +963,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Régimen: Sociedad Anónima de Capital Variable; Condiciones de pago: </Value>
<Value>Condiciones de pago: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
@@ -977,28 +977,7 @@
</Style>
</TextRun>
<TextRun>
<Value>; Método de Pago: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value)</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>; Num. Cta Pago:</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value)</Value>
<Value>; </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
@@ -1104,7 +1083,7 @@
</Style>
</TextRun>
<TextRun>
<Value> Por éste pagare prometo (emos) pagar incondicionalmente a la orden de Localización Precisa GPS de México SA de CV, a su vencimiento el </Value>
<Value> Por éste pagare prometo (emos) pagar incondicionalmente a la orden de VICTOR MANUEL RAMIREZ CASTILLO, a su vencimiento el </Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily>
@@ -1128,7 +1107,7 @@
</Style>
</TextRun>
<TextRun>
<Value>, en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ </Value>
<Value>, en Tijuana, Baja California o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ </Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily>
@@ -1176,7 +1155,7 @@
</Style>
</TextRun>
<TextRun>
<Value> ). Valor recibido a mi (nuestra) entera satisfacción. La falta de pago de éste documento a su vencimiento dará derecho a Localización Precisa GPS de México SA de CV o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a </Value>
<Value> ). Valor recibido a mi (nuestra) entera satisfacción. La falta de pago de éste documento a su vencimiento dará derecho a VICTOR MANUEL RAMIREZ CASTILLO o tenedor, desde el día siguiente a cobrar el 5% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Tijuana, Baja California a </Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontFamily>calibri</FontFamily>
@@ -3113,99 +3092,6 @@
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.6cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox15">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Uso CFDI:</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox15</rd:DefaultName>
<Style>
<Border>
<Color>White</Color>
<Style>None</Style>
</Border>
<TopBorder>
<Style>Solid</Style>
<Width>1pt</Width>
</TopBorder>
<BottomBorder>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<LeftBorder>
<Style>Solid</Style>
<Width>1pt</Width>
</LeftBorder>
<RightBorder>
<Style>Solid</Style>
<Width>1pt</Width>
</RightBorder>
<BackgroundColor>#ff1037</BackgroundColor>
<VerticalAlign>Middle</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox17">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!UsoCFDI.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox17</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>1.56188cm</Height>
<TablixCells>
@@ -3469,13 +3355,12 @@
<TablixMember />
<TablixMember />
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DsOC</DataSetName>
<Top>6.91306cm</Top>
<Left>0.11468cm</Left>
<Height>5.76188cm</Height>
<Height>5.16188cm</Height>
<Width>14.34413cm</Width>
<ZIndex>31</ZIndex>
<Style>
@@ -4036,7 +3921,6 @@
<Source>Embedded</Source>
<Value>VISTAPREVIA22</Value>
<Sizing>FitProportional</Sizing>
<Top>0cm</Top>
<Left>19.87567cm</Left>
<Height>18.27471cm</Height>
<Width>0.33541cm</Width>
@@ -4056,7 +3940,7 @@
<Sizing>FitProportional</Sizing>
<Top>1.19556cm</Top>
<Left>0.14361cm</Left>
<Height>1.67893cm</Height>
<Height>1.22745cm</Height>
<Width>4.7959cm</Width>
<ZIndex>35</ZIndex>
<Style>
@@ -4115,11 +3999,108 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox14">
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Uso CFDI: </Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!UsoCFDI.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Régime: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>Personas Físicas con Actividades Empresariales y Profesionales</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Método de Pago:</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value xml:space="preserve"> </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value)</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value xml:space="preserve"> </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox10</rd:DefaultName>
<Top>0.99561in</Top>
<Left>3.82301in</Left>
<Height>0.62735in</Height>
<Width>1.99164in</Width>
<ZIndex>37</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<VerticalAlign>Top</VerticalAlign>
</Style>
</Textbox>
</ReportItems>
<Height>25.59192cm</Height>
<Style />
</Body>
<Width>20.22041cm</Width>
<Width>20.21108cm</Width>
<Page>
<PageHeight>27.94cm</PageHeight>
<PageWidth>21.59cm</PageWidth>

View File

@@ -296,17 +296,17 @@ Partial Class General_SaldosIniciales
Exit Sub
End If
If RblFormato.SelectedValue = "4" Then
If Not dt.Columns(15).ColumnName = "ImpuestoLocal" Then
Alert("El nombre de la diesciseisava columna debe ser 'ImpuestoLocal'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
'If RblFormato.SelectedValue = "4" Then
' If Not dt.Columns(15).ColumnName = "ImpuestoLocal" Then
' Alert("El nombre de la diesciseisava columna debe ser 'ImpuestoLocal'. Favor de corregirlo", TipoMensaje.MsgError)
' Exit Sub
' End If
If Not dt.Columns(16).ColumnName = "Amort.Ant" Then
Alert("El nombre de la diescisieteava columna debe ser 'Amort.Ant'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
End If
' If Not dt.Columns(16).ColumnName = "Amort.Ant" Then
' Alert("El nombre de la diescisieteava columna debe ser 'Amort.Ant'. Favor de corregirlo", TipoMensaje.MsgError)
' Exit Sub
' End If
'End If
ElseIf RblFormato.SelectedValue = "5" Then
@@ -683,6 +683,7 @@ Partial Class General_SaldosIniciales
DTPS = ObjPS.DtResultados
End If
Dim NuevaClasificacion As Boolean = False
For Each Row As DataRow In dt.Rows
Dim Codigo As String = Row("Codigo").ToString
@@ -718,8 +719,9 @@ Partial Class General_SaldosIniciales
If ObjClas.AddClasificaciones(Clasificacion, "", -1, "-1", -1, "-1", -1, "-1",
GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "").ToString.ToEntero, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa) Then
If ObjClas.GetClasificaciones() Then Application("GlobalDTClasificaciones") = ObjClas.DtResultados
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
CveClasificacion = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString.ToEntero
NuevaClasificacion = True
End If
End If
@@ -831,7 +833,7 @@ Partial Class General_SaldosIniciales
'If Not CveClasificacion2 > 0 AndAlso Clasificacion2 <> "" Then Alert("No se encontró la Serie: " + Clasificacion2, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
If CvePS > 0 Then
If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveTamaño:=CveTamaño) Then
'If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
@@ -878,6 +880,9 @@ Partial Class General_SaldosIniciales
UpDatos.Update()
Else
ObjPS.RollBack()
If NuevaClasificacion Then
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
End If
End If
ObjPS.Dispose()
ObjGral.Dispose()
@@ -1356,8 +1361,8 @@ Partial Class General_SaldosIniciales
Dim Folio As Integer = Row("Folio").ToString.ToEntero
Dim Fecha As Date = Row("Fecha").ToString.ToDate
Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString.ToDate
Dim ImpuestoLocal As Double = Row("ImpuestoLocal").ToString.ToDouble
Dim Amortizacion As Double = Row("Amort.Ant").ToString.ToDouble
Dim ImpuestoLocal As Double = If(dt.Columns.Contains("ImpuestoLocal"), Row("ImpuestoLocal").ToString.ToDouble, 0.0)
Dim Amortizacion As Double = If(dt.Columns.Contains("Amort.Ant"), Row("Amort.Ant").ToString.ToDouble, 0.0)
Dim SubTotal As Decimal = Row("SubTotal").ToString.ToDecimal
Dim IVA As Decimal = Row("IVA").ToString.ToDecimal
Dim Total As Decimal = Row("Total").ToString.ToDecimal
@@ -1372,7 +1377,8 @@ Partial Class General_SaldosIniciales
Dim CveVendedor As Integer = 0
Dim IEPS As Decimal = 0 'Row("IEPS").ToString.ToDecimal
Dim CveClienteSucursal As Integer = 0 'Row("CveClienteSucursal").ToString.ToEntero
Dim ImpuestosLocales As Decimal = Row("ImpuestoLocal").ToString.ToDecimal
Dim ImpuestosLocales As Decimal = If(dt.Columns.Contains("ImpuestoLocal"), Row("ImpuestoLocal").ToString.ToDecimal, 0)
Dim FolioFiscal As String = If(dt.Columns.Contains("Folio Fiscal"), Row("Folio Fiscal").ToString, "")
GuardaLog(Sucursal + "-" + Row("Folio").ToString)
'Temporalmente SE BORRARA
@@ -1437,6 +1443,12 @@ Partial Class General_SaldosIniciales
ConceptoContablePago = 91
End If
If FolioFiscal <> "" Then
If Not ObjVentas.UpdateVentaFolioFiscal(FolioFiscal, CveVenta, UsuarioActual.CveEmpresa) Then
ErrorVentas = True
Exit For
End If
End If
'PrePólizaDetalle
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, Folio.ToString, 4, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=Sucursal.ToEntero) Then ErrorVentas = True : Exit For

View File

@@ -297,6 +297,7 @@ Partial Class Inventarios_CatAlmacenes
Private Sub DdlModalidad_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlModalidad.SelectedIndexChanged
If DdlModalidad.SelectedValue = 1 Then
divddlcc.Visible = True
CargaCuentasContables()
Else
divddlcc.Visible = False
End If

View File

@@ -2155,7 +2155,7 @@ Partial Class Inventarios_RecepcionAlmacen
ErrorMovInv = True
End If
If Not ErrorMovInv Then
If Not ErrorMovInv AndAlso Dt IsNot Nothing Then
For Each Dr As DataRow In Dt.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True

View File

@@ -309,6 +309,14 @@ Partial Class Inventarios_RecepcionUsados
ViewState("TmpDTAjustes") = value
End Set
End Property
Private Property DtPorcentajeMarcas As DataTable
Get
Return If(IsNothing(ViewState("DtPorcentajeMarcas")), Nothing, CType(ViewState("DtPorcentajeMarcas"), DataTable))
End Get
Set(value As DataTable)
ViewState("DtPorcentajeMarcas") = value
End Set
End Property
#End Region
@@ -2442,13 +2450,18 @@ Partial Class Inventarios_RecepcionUsados
Public Sub OnRblUsadosAjuste_Change(sender As Object, e As EventArgs)
DdlAlmacen.Items.Clear()
If RblUsadosAjuste.SelectedValue = "1" Then
CargaAjuste()
DivAjuste.Visible = True
'Llenar el dropdownlist de almacén
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 6)
LnkAgregarUsado.Visible = False
UppAcciones.Update()
If DdlClientes.SelectedValue <> "-1" Then
CargaAjuste()
DivAjuste.Visible = True
'Llenar el dropdownlist de almacén
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 6)
CargarDescuento()
LnkAgregarUsado.Visible = False
UppAcciones.Update()
Else
Alert("hace falta seleccionar un cliente")
RblUsadosAjuste.SelectedValue = "0"
End If
Else
DivAjuste.Visible = False
'Llenar el dropdownlist de almacén
@@ -2535,7 +2548,41 @@ Partial Class Inventarios_RecepcionUsados
If drPS IsNot Nothing Then
PrecioSugerido = drPS("Precio").ToString.ToDecimal
Dim PS As String = drPS("PS").ToString
Dim Arr = PS.Split("-"c)
If Arr.Count > 0 Then
If (DdlBCIAjuste.Items.FindByText(Arr(1).ToString) IsNot Nothing) Then
DdlBCIAjuste.SelectedValueExist(DdlBCIAjuste.Items.FindByText(Arr(1).ToString).Value)
End If
End If
End If
Dim MarcaPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero(String.Format("CveMarca = {0}", drPS("CveMarca").ToString))
If MarcaPorcentaje IsNot Nothing Then
Dim PorcentajeProducto As Decimal = MarcaPorcentaje("PorcentajeProducto").ToString.ToDecimal / 100
Dim PorcentajeProducto2 As Decimal = MarcaPorcentaje("PorcentajeProducto2").ToString.ToDecimal / 100
Dim PorcentajeProducto3 As Decimal = MarcaPorcentaje("PorcentajeProducto3").ToString.ToDecimal / 100
If PorcentajeProducto > 0 Then
Dim MontoDescuento As Decimal = PrecioSugerido * PorcentajeProducto
PrecioSugerido -= MontoDescuento
If PorcentajeProducto2 > 0 Then
MontoDescuento = PrecioSugerido * PorcentajeProducto2
PrecioSugerido -= MontoDescuento
If PorcentajeProducto3 > 0 Then
MontoDescuento = PrecioSugerido * PorcentajeProducto3
PrecioSugerido -= MontoDescuento
End If
End If
End If
End If
txtPrecio.Text = PrecioSugerido.FormatoNumero(2)
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
End If
@@ -2704,6 +2751,14 @@ Partial Class Inventarios_RecepcionUsados
End If
ObjPS.Dispose()
End Sub
Protected Sub CargarDescuento()
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPorcentajeMarcas(DdlClientes.SelectedValue.ToEntero) Then
DtPorcentajeMarcas = ObjPS.DtResultados.Copy()
End If
ObjPS.Dispose()
End Sub
#End Region
End Class

View File

@@ -89,7 +89,6 @@ Partial Class CatClasificaciones
CargaDdlSATPS()
CargaDDLs()
CargaGlobal()
DdlCategoriaFiltro.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
DdlCategoriaFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
@@ -152,20 +151,20 @@ Partial Class CatClasificaciones
CargaGrid()
End Sub
Public Sub CargaGlobal()
'Public Sub CargaGlobal()
Dim ObjClasificaciones As New ClsClasificaciones
' Dim ObjClasificaciones As New ClsClasificaciones
If ObjClasificaciones.GetClasificaciones() Then
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND CveEmpresa = {UsuarioActual.CveEmpresa} AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)")
GlobalDTClasificaciones = ObjClasificaciones.DtResultados
Else
Me.GvDatos.DataSource = Nothing
Alert("Ocurrió un error al cargar las clasificaciones. Por favor vuelva a intentar.", TipoMensaje.MsgError)
End If
' If ObjClasificaciones.GetClasificaciones(UsuarioActual.CveEmpresa) Then
' ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND CveEmpresa = {UsuarioActual.CveEmpresa} AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)")
' GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
' Else
' Me.GvDatos.DataSource = Nothing
' Alert("Ocurrió un error al cargar las clasificaciones. Por favor vuelva a intentar.", TipoMensaje.MsgError)
' End If
ObjClasificaciones.Dispose()
End Sub
' ObjClasificaciones.Dispose()
'End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
@@ -212,7 +211,7 @@ Partial Class CatClasificaciones
End If
End If
CargaGlobal()
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
ObjClasificaciones.Dispose()
CargaDatos()
@@ -317,6 +316,7 @@ Partial Class CatClasificaciones
If ObjClasificaciones.RemoveClasificacion(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
GvDatos.EditIndex = -1
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
Alert("La Clasificación se eliminó correctamente.", TipoMensaje.MsgInformacion)
Else
Alert("Ocurrió un error al eliminar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
@@ -324,7 +324,7 @@ Partial Class CatClasificaciones
ObjClasificaciones.Dispose()
CargaGrid()
CargaGlobal()
End Sub
#End Region
@@ -348,7 +348,9 @@ Partial Class CatClasificaciones
TxtClasificacion.Text = ""
TxtPrecioBaseCosto.Text = ""
DdlCategoria.SelectedIndex = 0
If DdlCategoria.Items.Count > 0 Then
DdlCategoria.SelectedIndex = 0
End If
DdlSATPS.SelectedValue = ""
DdlSATPS.SelectedText = ""
LtlTituloModal.Text = "Agregar Clasificación"

View File

@@ -137,11 +137,12 @@ Partial Class Ventas_CatVendedores
#Region "CARGA GLOBAL"
Private Sub CargaGlobal()
Dim ObjVendedores As New ClsVtaVendedores
If ObjVendedores.GetVendedores(-1) Then
GlobalDTVendedores(-1) = ObjVendedores.DtResultados
End If
ObjVendedores.Dispose()
GlobalDTVendedores(UsuarioActual.CveEmpresa) = Nothing
'Dim ObjVendedores As New ClsVtaVendedores
'If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
' GlobalDTVendedores(-1) = ObjVendedores.DtResultados
'End If
'ObjVendedores.Dispose()
End Sub
#End Region

View File

@@ -459,7 +459,7 @@ Partial Class Ventas_ClientesAbonar
TxtImporte.Text = ""
TxtObservaciones.Text = ""
If SumDescuentoProntoPago > 0.0 Then
GvCxC.Columns("DescuentoProntoPago").Visible = True
GvCxC.Columns(15).Visible = True
End If
Mov.Dispose()
@@ -900,6 +900,7 @@ Partial Class Ventas_ClientesAbonar
Select Case ConceptoContable
Case 2 'Pago Cliente
'If gvr.DataKey("CveMoneda").ToEntero > 1 Then ConceptoContable = 292
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
importeMX = ImporteMovimiento

View File

@@ -616,8 +616,7 @@
</th>
<th id="thEncIEPS1" runat="server" visible="false">IEPS
</th>
<th>Total&nbsp<%--;<asp:LinkButton ID="ImgDescConcepto" runat="server" Text="<i class='fa fa-comment-o'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" /></th>--%>
<th style="width: 100px;" colspan="3">Comandos</th>
<th>Total&nbsp<%--;<asp:LinkButton ID="ImgDescConcepto" runat="server" Text="<i class='fa fa-comment-o'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" /></th>--%><th style="width: 100px;" colspan="3">Comandos</th>
<th></th>
<th runat="server" visible="false" id="nomostrar2"></th>
</tr>

View File

@@ -5611,6 +5611,9 @@ Partial Class Ventas
'LO NO PERMITIDO MODIFICAR
e.Row.FCDropDownList("DdlUnidadMedida").Enabled = False
If UsuarioActual.CveEmpresa = 119 Then
e.Row.FCTextBox("TxtCantidad").Enabled = False
End If
'e.Row.FCDropDownList("DdlClasificacion").Enabled = False
'e.Row.FCDropDownLost("DdlPS").Enabled = False
@@ -6704,6 +6707,23 @@ Partial Class Ventas
GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjFactura, TmpDT, ObjFactura.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS,
ObjEventos, ObjCGame, ObjClientes, EsNCAmortizacion:=EsNCAmortizacion)
'Agregamos las OCs a la tabla
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso DTOrdenesCompraPS IsNot Nothing AndAlso DTOrdenesCompraPS.Rows.Count > 0 AndAlso ErrorList.Count = 0 Then
Dim CveVentaDetalle As Integer = 0
Dim CveOrdenCompraDetalle As Integer = 0
Dim Cantidad As Decimal = 0
For Each row As DataRow In TmpDT.Rows
Cantidad = row("Cantidad").ToString.ToDecimal
CveVentaDetalle = row("CveVentaDetalle").ToString.ToEntero
CveOrdenCompraDetalle = row("CveOrdenCompraDetalle").ToString.ToEntero
If Not ObjVentas.AgregarVentaOCDetalle(CveVentaDetalle, CveOrdenCompraDetalle, Cantidad) Then
ErrorList.Add("Ocurrió un Error al agregar el detalle de la Remision")
Exit For
End If
Next
End If
'SI ES REFACTURACION
Dim ObjNC As List(Of Object) = Nothing
If ErrorList.Count = 0 Then
@@ -6723,7 +6743,6 @@ Partial Class Ventas
End If
End If
End If
End If
End If
@@ -6789,24 +6808,6 @@ Partial Class Ventas
End If
End If
'Agregamos las OCs a la tabla
If DTOrdenesCompraPS IsNot Nothing AndAlso DTOrdenesCompraPS.Rows.Count > 0 AndAlso ErrorList.Count = 0 Then
Dim CveVentaDetalle As Integer = 0
Dim CveOrdenCompraDetalle As Integer = 0
Dim Cantidad As Decimal = 0
For Each row As DataRow In TmpDT.Rows
Cantidad = row("Cantidad").ToString.ToDecimal
CveVentaDetalle = row("CveVentaDetalle").ToString.ToEntero
CveOrdenCompraDetalle = row("CveOrdenCompraDetalle").ToString.ToEntero
If Not ObjVentas.AgregarVentaOCDetalle(CveVentaDetalle, CveOrdenCompraDetalle, Cantidad) Then
ErrorList.Add("Ocurrió un Error al agregar el detalle de la Remision")
End If
Next
End If
'Agregamos las Cotizaciones a la tabla
If DtCotizacionesPS IsNot Nothing AndAlso DtCotizacionesPS.Rows.Count > 0 AndAlso ErrorList.Count = 0 Then
Dim CveVentaDetalle As Integer = 0
@@ -6828,8 +6829,6 @@ Partial Class Ventas
Next
End If
'Marcamos las ventas anteriores a febrero como surtidas - Ajuste Compu
If ErrorList.Count = 0 Then
If Not ObjVentas.MarcarRemisionesSinSurtir(ObjVentas.CveVenta) Then
@@ -7723,15 +7722,21 @@ Partial Class Ventas
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
If (ObjFactura.CveMoneda = 2 AndAlso ObjFactura.ConvertirPesos = True AndAlso ObjFactura.TipodeComprobante = "Ingresos" AndAlso RemisionesLista.Count > 0) Then
Dim TotalCalculableImpuestos, TotalCalculableImpuestosIVA As Decimal
For Each Row As DataRow In TmpDT.Rows
Row("PU") = Math.Round(Row("PU").ToString.ToDouble * ObjFactura.TipoCambio, 6)
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal * ObjFactura.TipoCambio, 6)
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
TotalCalculableImpuestos = (Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal) - Row("Descuento").ToString.ToDecimal
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + Row("PorcentajeIEPS").ToString.ToDecimal)
Row("IVA") = Row("PorcentajeIVA")
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestosIVA, NumeroDecimales)
Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
Row("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales)
Row("ImporteIEPS") = Math.Round(Row("PorcentajeIEPS").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
Row("IEPS") = Row("ImporteIEPS")
Row("Total") = Math.Round(Row("Cantidad").ToString.ToDouble * Row("PU").ToString.ToDouble, NumeroDecimales)
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString.ToDouble * Row("PU").ToString.ToDouble, NumeroDecimales)
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
Next
Dim ImpuestosLocales As Double = 0
@@ -7799,21 +7804,28 @@ Partial Class Ventas
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS REGISTRO DIRECTO SIN VENTA
ElseIf (EditoRemision = False AndAlso ObjFactura.CveMoneda = 2 AndAlso ObjFactura.ConvertirPesos = True) Then
Dim TotalCalculableImpuestos, TotalCalculableImpuestosIVA As Decimal
For Each Row As DataRow In TmpDT.Rows
Row("PU") = Math.Round(Row("PU").ToString.ToDouble * ObjFactura.TipoCambio, 6)
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal * ObjFactura.TipoCambio, 6)
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
TotalCalculableImpuestos = (Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal) - Row("Descuento").ToString.ToDecimal
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + Row("PorcentajeIEPS").ToString.ToDecimal)
Row("IVA") = Row("PorcentajeIVA")
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestosIVA, NumeroDecimales)
Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
Row("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales)
Row("ImporteIEPS") = Math.Round(Row("PorcentajeIEPS").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
Row("IEPS") = Row("ImporteIEPS")
Row("Total") = Math.Round(Row("Cantidad").ToString.ToDouble * Row("PU").ToString.ToDouble, NumeroDecimales)
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString.ToDouble * Row("PU").ToString.ToDouble, NumeroDecimales)
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
Next
Dim ImpuestosLocales As Double = 0
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
If gvr.RowType = DataControlRowType.DataRow Then
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * ObjFactura.TipoCambio).FormatoNumero
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal * ObjFactura.TipoCambio).FormatoNumero
ImpuestosLocales += Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
End If
Next
@@ -9037,7 +9049,7 @@ Partial Class Ventas
#Region " GUARDAR - VENTA, PREPOLIZAS, INV, ESTIMACIONES, AC, NOTA DE CRÉDITO "
Private Sub GuardarVenta(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, factura As Modelos.Factura, TmpDTDetalle As DataTable, CveNCaVincular As Integer,
Private Sub GuardarVenta(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, factura As Modelos.Factura, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer,
ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing,
ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNCAmortizacion As Boolean = False, Optional NCDescuento As Boolean = False)
@@ -9108,8 +9120,8 @@ Partial Class Ventas
PedidoContrato:=TxtPedidoContrato.Text, ObservacionesAlmacen:=TxtObsAlmacen.Text, CveSubProyecto:=factura.CveSubProyecto, CveSubProyectoCobranza:=factura.CveSubProyectoCobranza, CveSubProyectoEjecucion:=factura.CveSubProyectoEjecucion, CveFormaPago33:=factura.CveFormaPago33,
CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=TxtOrdenCompra.Text, CveCuentaTerminal:=DdlCuentasTerminal.SelectedValue.ToEntero, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False)) Then
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False)) Then
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
@@ -9171,7 +9183,7 @@ Partial Class Ventas
End If
End If
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {Row("Consec").ToString}")(0)
Dim TmpDr As DataRow = TmpDTDetalle.Select($"Consec = {Row("Consec").ToString}")(0)
TmpDr("CveVentaDetalle") = ObjVentas.CveVentaDetalle
Try
@@ -9342,7 +9354,7 @@ Partial Class Ventas
Cantidad = DtPedidos2TmpDT.FiltroPrimeroValor("Cantidad", $"CveVentaDetallePedido2={row("CveVentaDetalle")}").ToDecimal
CvePS = DtPedidos2TmpDT.FiltroPrimeroValor("CvePS", $"CveVentaDetallePedido2={row("CveVentaDetalle")}").ToEntero
PU = DtPedidos2TmpDT.FiltroPrimeroValor("PU", $"CveVentaDetallePedido2={row("CveVentaDetalle")}").ToDecimal
CveVentaDetalle = TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"CveVentaDetallePedido2={row("CveVentaDetalle")}").ToEntero
CveVentaDetalle = TmpDTDetalle.FiltroPrimeroValor("CveVentaDetalle", $"CveVentaDetallePedido2={row("CveVentaDetalle")}").ToEntero
CveVentaDetallePadre = row("CveVentaDetalle").ToString.ToEntero
If Not ObjVentas.AddVentaDetallePedido2(CveVentaDetalle, CveVentaDetallePadre, Cantidad) Then
@@ -9393,6 +9405,7 @@ Partial Class Ventas
End If
End Sub
Private Sub GuardarVentaPrePolizas(ByRef ObjConta As ClsContabilidad, factura As Modelos.Factura, TmpDTDetalleMovimientos As DataTable, CveNCaVincular As Integer,
ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, ByRef Optional ObjVentas As ClsVentas = Nothing,
ByRef Optional ObjEventos As ClsOIEventos = Nothing, Optional EsNCAmortizacion As Boolean = False, Optional NCDescuento As Boolean = False)
@@ -9512,6 +9525,7 @@ Partial Class Ventas
Select Case ConceptoContable
Case 1 'Cliente
If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem", "RNC") Then
If ObjFactura.CveMoneda > 1 Then ConceptoContable = 291
importeMovimiento = (ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
@@ -9542,6 +9556,7 @@ Partial Class Ventas
CveCuentaCliente = CveCuenta
End If
Case 3 'Cliente
If ObjFactura.TipoDocto = "Ant" Then
@@ -10257,7 +10272,9 @@ Partial Class Ventas
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
Dim CampoCuenta As String = "IdCuentaGasto"
If UsuarioActual.CveEmpresa.Contiene(80, 72, 146) Then CampoCuenta = "IdCuentaDescuento"
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor(CampoCuenta, String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
Else
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
End If
@@ -11685,6 +11702,7 @@ Partial Class Ventas
Select Case ConceptoContable
Case 2 'Cliente
'If CveMonedaVenta > 1 Then ConceptoContable = 292
If Not (gvr.DataKey("CveIE").ToString.ToEntero > 0 AndAlso gvr.DataKey("CveConceptoContable").ToString().ToEntero = 66) Then
If DdlMoneda.SelectedValue.ToEntero = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
@@ -13824,10 +13842,12 @@ Partial Class Ventas
If DtPromociones.Rows.Count > 0 And DtPromociones IsNot Nothing Then
Dim dr As DataRow = DtPromociones.FiltroPrimero($"CvePS = {CvePS}")
TipoPromo = dr("TipoPromocion").ToString.ToEntero
TotalPromocion = dr("PUPromocion").ToString.ToDecimal * TxtCantidad.Text.ToDecimal
PromocionPorcentaje = dr("Promocion").ToString.ToDecimal
CantMinima = dr("CantidadMinima").ToString.ToEntero
If dr IsNot Nothing Then
TipoPromo = dr("TipoPromocion").ToString.ToEntero
TotalPromocion = dr("PUPromocion").ToString.ToDecimal * TxtCantidad.Text.ToDecimal
PromocionPorcentaje = dr("Promocion").ToString.ToDecimal
CantMinima = dr("CantidadMinima").ToString.ToEntero
End If
End If
If TipoPromo = 1 Then 'Promocion por Importe $
@@ -14252,7 +14272,8 @@ Partial Class Ventas
'AGREGA PS ADICIONAL
If UsuarioActual.Empresa.Funcionalidad(561).ToString = "1" AndAlso GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows.Count > 0 AndAlso Not SeActualiza Then
If UsuarioActual.Empresa.Funcionalidad(561).ToString = "1" AndAlso Not UsuarioActual.TienePermisoProceso(284) AndAlso GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows.Count > 0 AndAlso Not SeActualiza Then
For Each Dr As DataRow In GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows
Dim CvePSAdicional As Integer = Dr("CvePSAdicional").ToString.ToEntero
Dim DrPoliza As DataRow = TmpDT.NewRow()
@@ -14334,6 +14355,8 @@ Partial Class Ventas
TmpDT.Rows.Add(DrPoliza)
End If
Next
End If
Retorno = True
@@ -15346,9 +15369,11 @@ Partial Class Ventas
If ErrorList.Count = 0 AndAlso MovDetalle.Rows.Count > 0 Then
Dim CveMovimientoSalidaPorTraspaso As Integer = -1
Dim CveConceptoSalidaAlmacen As Integer = 3
Dim CveAlmacenParaSalida As Integer = CveAlmacenEntrada
'SALIDA DEFINITIVA DEL SISTEMA
If UsuarioActual.Empresa.Funcionalidad(575) = "1" Then
CveConceptoSalidaAlmacen = 40
CveAlmacenParaSalida = CveAlmacenSalida
''Le damos salida normal
'If ConSalida Then
' GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 40, CveMoneda, CveVenta, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
@@ -15393,7 +15418,7 @@ Partial Class Ventas
End If
If Not OcurrioError Then
GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenEntrada, CveConceptoSalidaAlmacen, CveMoneda, ObjFactura.CveVenta, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenParaSalida, CveConceptoSalidaAlmacen, CveMoneda, ObjFactura.CveVenta, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
If Not GeneroMovimientoAlmacen Then
OcurrioError = True
@@ -16256,7 +16281,7 @@ Partial Class Ventas
Next
'ACTIVA CAMBIO DE CLIENTE - SI NO TIENE NADA FACTURADO
If Not CantidadFacturadaRemision > 0 Then
If Not CantidadFacturadaRemision > 0 AndAlso UsuarioActual.TienePermisoProceso(284) Then
HlCliente.Attributes.Remove("class")
HlCliente.Attributes.Add("class", "Texto")
TxtCodigo.ReadOnly = False
@@ -18232,7 +18257,9 @@ Partial Class Ventas
Exit Sub
End If
If String.IsNullOrEmpty(Vigencia.EsCancelable) Then
sb.Append("<b>No encontrado</b> <br/>")
Alert("No se pudo encontrar el estatus de la factura en el SAT.", TipoMensaje.MsgAdvertencia)
Exit Sub
'sb.Append("<b>No encontrado</b> <br/>")
Else
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
End If
@@ -23510,12 +23537,15 @@ Partial Class Ventas
End If
For Each drow As DataRow In TmpDT.Rows
For Each drow2 As DataRow In DTCvePSCostos.Rows
If drow("CvePS").ToString.ToEntero = drow2("CvePSCargo").ToString.ToEntero Then
drow("Eliminar") = 1
Exit For
End If
Next
If DTCvePSCostos IsNot Nothing Then
For Each drow2 As DataRow In DTCvePSCostos.Rows
If drow("CvePS").ToString.ToEntero = drow2("CvePSCargo").ToString.ToEntero Then
drow("Eliminar") = 1
Exit For
End If
Next
End If
Next
Dim TmpDTView As New DataView(TmpDT)

View File

@@ -67,52 +67,41 @@ Public Class WSApp
Application("GlobalDTVtaFormaPago") = value
End Set
End Property
'Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
' Get
Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTSubProyectos{0}", CveEmpresa)
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then
Dim P As New ClsSubProyectos
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados
P.Dispose()
' If DirectCast(Application("GlobalDTSubProyectos"), DataTable) Is Nothing Or (DirectCast(Application("GlobalDTSubProyectos"), DataTable) IsNot Nothing AndAlso DirectCast(Application("GlobalDTSubProyectos"), DataTable).Rows.Count = 0) Then
' Dim P As New ClsSubProyectos
' If P.GetSubProyectos Then
' Application("GlobalDTSubProyectos") = P.DtResultados
' End If
' P.Dispose()
Dim msg As String = "aqui no se carga subproyectos"
msg.GuardaLog()
' Dim msg As String = "aqui no se carga subproyectos"
' 'If Request IsNot Nothing Then
' ' msg = msg & Request.ServerVariables("URL")
' 'End If
' msg.GuardaLog()
End If
' End If
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
Dim StrSQL As New StringBuilder
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
' If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
' Dim StrSQL As New StringBuilder
' If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
' If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
' If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
' If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
GlobalDTSubProyectos = Dv.ToTable
Dv.Dispose()
' Dim Dv As New DataView(DirectCast(Application("GlobalDTSubProyectos"), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
' GlobalDTSubProyectos = Dv.ToTable
' Dv.Dispose()
Else
GlobalDTSubProyectos = DirectCast(Application(AppNombre), DataTable)
End If
' Else
' GlobalDTSubProyectos = DirectCast(Application("GlobalDTSubProyectos"), DataTable)
' End If
' End Get
' Set(ByVal value As DataTable)
' If value Is Nothing OrElse value.Rows.Count = 0 Then
' Dim msg As String = "aqui no se carga subproyectos"
' 'If Request IsNot Nothing Then
' ' msg = msg & Request.ServerVariables("URL")
' 'End If
' msg.GuardaLog()
' End If
' Application("GlobalDTSubProyectos") = value
' End Set
'End Property
End Get
Set(ByVal value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTSubProyectos{0}", CveEmpresa)
Application(AppNombre) = value
End Set
End Property
Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable
Get
If EsPersonaFisica <> -1 Then

File diff suppressed because it is too large Load Diff