This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2023-07-05 10:45:02 -07:00
39 changed files with 3031 additions and 6438 deletions

View File

@@ -1125,27 +1125,16 @@ Public Class ClsBancos
Dim Timbrado As New Timbrado
Dim CFDIVersion As String = "4.0"
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
If GetComplementoPagosImpuestos(CveIE, UsuarioActual.CveEmpresa) Then
dttpagosimpuestos = DtResultados
End If
If GetComplementoPagosImpuestos(CveIE, UsuarioActual.CveEmpresa) Then
dttpagosimpuestos = DtResultados
End If
Timbre = Timbrado.PreparaTimbrePago40(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal,
Timbre = Timbrado.PreparaTimbrePago40(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal,
RFCCliente, dr("NombreCliente").ToString, dr("ClienteCP").ToString, dr("CodigoRegimenFiscal").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago,
dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal,
UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDecimal, dttpagos, dttpagosimpuestos, CFDIRelacionado:=CFDIRelacionado,
RfcACuentaTerceros:=dr("RfcACuentaTerceros").ToString, NombreACuentaTerceros:=dr("NombreACuentaTerceros").ToString, RegimenFiscalACuentaTerceros:=dr("RegimenFiscalACuentaTerceros").ToString, DomicilioFiscalACuentaTerceros:=dr("DomicilioFiscalACuentaTerceros").ToString)
Else
CFDIVersion = "3.3"
Timbre = Timbrado.PreparaTimbrePago(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal,
RFCCliente, dr("NombreCliente").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago,
dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal,
UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDecimal, dttpagos, CFDIRelacionado:=CFDIRelacionado, EsCancelacion:=False)
End If
''PREPARA PARA CANCELACION POR SUSTITUCION DE COMPLEMENTO DE PAGO
'If CFDIRelacionado <> "-1" And CFDIRelacionado <> "" Then

View File

@@ -4101,26 +4101,51 @@ Public Class ClsPaginas
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTAcumGarantiasMesesTipoUso(CveEmpresa As Integer, CveMarca As Integer) As DataTable
Property GlobalDTAcumGarantiasTipoUso(CveEmpresa As Integer, CveMarca As Integer, CveTipoUso As Integer) As DataTable
Get
Dim AppNombre As String = $"GlobalDTAcumGarantiasMesesTipoUso-{CveEmpresa}"
Dim AppNombre As String = $"GlobalDTAcumGarantiasTipoUso-{CveEmpresa}"
If Application(AppNombre) Is Nothing Then
Dim ObjAcumuladores As New ClsAcumuladores()
If ObjAcumuladores.GarantiasMesesGet(-1, CveEmpresa) Then Application(AppNombre) = ObjAcumuladores.DtResultados.FiltraParametros("", DistinctColumns:={"CveMarca", "CveTipoUso", "TipoUso"})
ObjAcumuladores.Dispose()
End If
If CveMarca <> -1 Then
Dim Str As StringBuilder = New StringBuilder()
If CveMarca <> -1 Then Str.AppendFormat("CveMarca = {0}", CveMarca)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTAcumGarantiasMesesTipoUso = Dv.ToTable
Dv.Dispose()
Else
GlobalDTAcumGarantiasMesesTipoUso = DirectCast(Application(AppNombre), DataTable)
End If
Dim filtros As New List(Of String)
If CveMarca <> -1 Then filtros.Add($"CveMarca = {CveMarca}")
If CveTipoUso <> -1 Then filtros.Add($"CveTipoUso = {CveTipoUso}")
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTAcumGarantiasTipoUso = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTAcumGarantiasMesesTipoUso-{CveEmpresa}"
Dim AppNombre As String = $"GlobalDTAcumGarantiasTipoUso-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTAcumGarantiasTipoUsoMeses(CveEmpresa As Integer, CveMarca As Integer, CveTipoUso As Integer, Mes As Integer) As DataTable
Get
Dim AppNombre As String = $"GlobalDTAcumGarantiasTipoUsoMeses-{CveEmpresa}"
If Application(AppNombre) Is Nothing Then
Dim ObjAcumuladores As New ClsAcumuladores()
If ObjAcumuladores.GarantiasMesesGet(-1, CveEmpresa) Then Application(AppNombre) = ObjAcumuladores.DtResultados
ObjAcumuladores.Dispose()
End If
Dim filtros As New List(Of String)
If CveMarca <> -1 Then filtros.Add($"CveMarca = {CveMarca}")
If CveTipoUso <> -1 Then filtros.Add($"CveTipoUso = {CveTipoUso}")
If Mes <> -1 Then filtros.Add($"Mes = {Mes}")
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTAcumGarantiasTipoUsoMeses = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTAcumGarantiasTipoUsoMeses-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
@@ -5398,11 +5423,9 @@ Public Class ClsPaginas
params.Add(New ReportParameter("CETipoCambio", CETipoCambio))
End If
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
params.Add(New ReportParameter("CFDIVersion", Vta.Version))
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
params.Add(New ReportParameter("RegimenFiscalCodigo", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}"))
End If
params.Add(New ReportParameter("CFDIVersion", Vta.Version))
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
params.Add(New ReportParameter("RegimenFiscalCodigo", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}"))
End If
'CLIENTE
@@ -6938,7 +6961,7 @@ Public Class ClsPaginas
Dim FechaRecibo = ""
Dim ProveedorIntermediario As String = ""
Dim RegimenFiscalCodigo As String = ""
Dim CFDIVersion As String = If(UsuarioActual.Empresa.Funcionalidad(350) = "1", "4.0", "3.3")
Dim CFDIVersion As String = "4.0"
Dim Observaciones As String = ""
'DT PAGO
@@ -7035,10 +7058,8 @@ Public Class ClsPaginas
params.Add(New ReportParameter("ClienteCP", ObjClientes.CP))
params.Add(New ReportParameter("ClienteRFC", ObjClientes.RFC))
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
RegimenFiscalCodigo = $"{ObjClientes.CodigoRegimenFiscal}-{ObjClientes.RegimenFiscal}"
End If
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
RegimenFiscalCodigo = $"{ObjClientes.CodigoRegimenFiscal}-{ObjClientes.RegimenFiscal}"
End If
End If
ObjClientes.Dispose()
@@ -7077,11 +7098,9 @@ Public Class ClsPaginas
cfdVer = "http://www.sat.gob.mx/cfd/4"
End If
If Version = "4.0" Then
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
params.Add(New ReportParameter("CFDIVersion", Version))
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
params.Add(New ReportParameter("RegimenFiscalCodigo", RegimenFiscalCodigo))
End If
params.Add(New ReportParameter("CFDIVersion", Version))
If ObjClientes.CodigoRegimenFiscal.ToString.Length > 0 Then
params.Add(New ReportParameter("RegimenFiscalCodigo", RegimenFiscalCodigo))
End If
End If
namespaces.AddNamespace(Prefijo, cfdVer)
@@ -7137,7 +7156,7 @@ Public Class ClsPaginas
If Version = "3.3" Then DrRelacionado("MetodoDePagoDR") = Relacionado.Attributes("MetodoDePagoDR").Value
If Version = "4.0" Then DrRelacionado("ObjetoImpDR") = Relacionado.Attributes("ObjetoImpDR").Value
DrRelacionado("MonedaDR") = Relacionado.Attributes("MonedaDR").Value
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso Version = "4.0" Then
If Version = "4.0" Then
Dim NodosTraslados = Relacionado.SelectNodes($"{PagoVersion}:ImpuestosDR/{PagoVersion}:TrasladosDR/{PagoVersion}:TrasladoDR", namespaces)
For Each NodoTraslados As XmlNode In NodosTraslados
Dim BaseDR As String = ValorXML(NodoTraslados, "BaseDR")
@@ -8127,6 +8146,7 @@ Public Class ClsPaginas
PaginaDict.Add("/CargaCuentas.aspx".ToUpper(), -1)
PaginaDict.Add("/OI/Tareas.aspx".ToUpper(), -1)
PaginaDict.Add("/OI/RepProyectos.aspx".ToUpper(), 907)
'PaginaDict.Add("/OI/GraficaGantt.aspx".ToUpper(), 371)
PaginaDict.Add("/OI/Proyecto.aspx".ToUpper(), 907)
PaginaDict.Add("/OI/Tablero.aspx".ToUpper(), 910)
PaginaDict.Add("/OI/TableroDetalle.aspx".ToUpper(), 910)
@@ -9179,9 +9199,9 @@ Public Class ClsPaginas
PaginaDict.Add("/Ventas/RepProductosServicios.aspx".ToUpper(), 352)
PaginaDict.Add("/Ventas/RepProductosServiciosDetalle.aspx".ToUpper(), 352)
PaginaDict.Add("/Ventas/RepPS.aspx".ToUpper(), 701)
PaginaDict.Add("/Ventas/RepABT.aspx".ToUpper(), 353)
'PaginaDict.Add("/Ventas/RepABT.aspx".ToUpper(), 353)
PaginaDict.Add("/Ventas/CatPromociones.aspx".ToUpper(), 123)
PaginaDict.Add("/Ventas/Promociones.aspx".ToUpper(), 124)
PaginaDict.Add("/Ventas/Promociones.aspx".ToUpper(), 123)
PaginaDict.Add("/Ventas/CatFamiliaSubFamilia.aspx".ToUpper(), 372)
PaginaDict.Add("/Ventas/RepComisiones.aspx".ToUpper(), 382)
PaginaDict.Add("/Ventas/RepComisionesDetalle.aspx".ToUpper(), 382)

View File

@@ -2126,24 +2126,24 @@ Public Class ClsVentas
End Function
#End Region
Public Function GetRepABT(Ejercicio As Integer, Periodo As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasGetRepABT")
'Public Function GetRepABT(Ejercicio As Integer, Periodo As Integer) As Boolean
' Dim Retorno As Boolean = False
' DataAdapter("PA_VentasGetRepABT")
With SqlAdapter.SelectCommand.Parameters
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
.Add("@Periodo", SqlDbType.Int).Value = Periodo
End With
' With SqlAdapter.SelectCommand.Parameters
' .Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
' .Add("@Periodo", SqlDbType.Int).Value = Periodo
' End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el Reporte ABT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
' Try
' SqlAdapter.Fill(Data)
' Retorno = True
' Catch ex As Exception
' OnError("Ocurrió un error al obtener el Reporte ABT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
' End Try
Return Retorno
End Function
' Return Retorno
'End Function
#Region " PROMOCIONES "
Public Function GetPromociones(CvePromocion As Integer, Fecha As String, CveVendedor As Integer, CveCliente As Integer, Estatus As Integer, CveEmpresa As Integer,

View File

@@ -86,7 +86,7 @@ Public Class LogicNominas
Dim versionTimbre As VersionTimbradoEnum = versionTimbrex
If versionTimbre = VersionTimbradoEnum.PorDefectoEmpresa Then
versionTimbre = If(UsuarioActual.Empresa.Funcionalidad(350) = "1", VersionTimbradoEnum.Version4_0, VersionTimbradoEnum.Version3_3)
versionTimbre = VersionTimbradoEnum.Version4_0
End If
Dim continuar As Boolean = True

File diff suppressed because it is too large Load Diff

View File

@@ -42,8 +42,7 @@ Public Class Timbres
Private Sub CreaObjetosTraslados(TipoDocto As String, CveTimbre As Integer)
ObjFactura = New Modelos.Factura
ObjFactura.Version = "3.3"
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then ObjFactura.Version = "4.0"
ObjFactura.Version = "4.0"
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa

View File

@@ -100,18 +100,18 @@ Public Class E119 : Implements IHttpHandler
Try
Dim Metodo = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
'OBTENER EXISTENCIAS
If Metodo = "BASF_POG40" Then
context.Response.ContentType = "application/json"
Dim Auth = ValidarSolicitud(context)
'If Metodo = "BASF_POG40" Then
' context.Response.ContentType = "application/json"
' Dim Auth = ValidarSolicitud(context)
If Auth.IsSucces Then
retorno = ConsultaDatos(context)
Else
context.Response.StatusCode = Auth.StatusCode
retorno = JsonConvert.SerializeObject(Auth.ErrorMessage)
End If
' If Auth.IsSucces Then
' retorno = ConsultaDatos(context)
' Else
' context.Response.StatusCode = Auth.StatusCode
' retorno = JsonConvert.SerializeObject(Auth.ErrorMessage)
' End If
End If
'End If
context.Response.Write(retorno)

View File

@@ -1495,13 +1495,9 @@ Partial Class Ventas_ClientesAbonar
ObjFacturaDevolucion.FormaPago = 0
ObjFacturaDevolucion.TipoDocto = "Egs"
ObjFacturaDevolucion.Fecha = Now
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
ObjFacturaDevolucion.Version = "4.0"
Else
ObjFacturaDevolucion.Version = "3.3"
End If
ObjFacturaDevolucion.Fecha = Now
ObjFacturaDevolucion.Version = "4.0"
ObjFacturaDevolucion.CveMetodoPago33 = 1
ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición"
@@ -1671,11 +1667,7 @@ Partial Class Ventas_ClientesAbonar
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
Else
Timbre.Receptor.RFC = Obj.Cliente.RFC
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
Else
Timbre.Receptor.Nombre = Obj.Cliente.Nombre + " " + Obj.Cliente.RegimenSociedad
End If
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
End If

View File

@@ -4778,7 +4778,8 @@ Partial Class Bancos_IE
filemove = fileItem.filename
Next
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
If filemove <> "" Then
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
End If

View File

@@ -13,14 +13,11 @@
<asp:UpdatePanel runat="server">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkHabilitarSaldar" runat="server"><i class="fa fa-money"></i> Otros Egresos</asp:LinkButton>
<asp:LinkButton ID="LnkHabilitarSaldar" runat="server"><i class="fa fa-money"></i> Saldar</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkHabilitarSaldarFyE" runat="server"><i class="fa fa-money"></i> Viaticos-Personal</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkSaldar" Visible="false" OnClick="LnkSaldar_Click" runat="server"><i class="fa fa-money"></i> Saldar Proveedores</asp:LinkButton>
</li>
</li>
<li>
<asp:LinkButton ID="LnkSaldarFyE" Visible="false" OnClick="LnkSaldarFyE_Click" runat="server"><i class="fa fa-money"></i> Saldar FyE</asp:LinkButton>
</li>
@@ -143,8 +140,43 @@
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UpSaldar" UpdateMode="Conditional">
<ContentTemplate>
<br />
<div class="row" id="DVSaldar" runat="server" visible="false">
<div class="col-lg-1">
Concepto:
</div>
<div class="col-lg-3">
<asp:TextBox runat="server" ID="TxtConcepto" CausesValidation="true" Width="200px" MaxLength="100"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtConcepto" runat="server" Enabled="true" CssClass="help-block errorimput" ControlToValidate="TxtConcepto" Display="Dynamic"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpSaldar"></asp:RequiredFieldValidator>
</div>
<div class="col-lg-1">
<asp:Label runat="server" ID="LblSubproyecto"></asp:Label>:
</div>
<div class="col-lg-2">
<asp:DropDownList runat="server" ID="DdlSubProyecto" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlSubProyecto" Display="Dynamic"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpSaldar"></asp:RequiredFieldValidator>
</div>
<div class="col-lg-1">
<asp:LinkButton ID="LnkSaldar" Visible="true" OnClick="LnkSaldar_Click" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpSaldar">
<i class="fa fa-money"></i> Saldar
</asp:LinkButton>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<ajax:TabContainer ID="tabGeneral" runat="server" ActiveTabIndex="0" Width="100%" >
@@ -153,9 +185,9 @@
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvESC" runat="server" DataKeyNames="CveIE, Saldo, CveMoneda, CveConceptoContable, CveProveedor, CvePersonal,CveSubProyecto" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros de Egresos sin Comprobar de Proveedores" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
<asp:GridView ID="GvESC" runat="server" DataKeyNames="CveIE, Saldo, TipoCambio, CveMoneda, CveConceptoContable, CveProveedor, CvePersonal,CveSubProyecto,Folio, CveTipoProveedor" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros de Egresos sin Comprobar de Proveedores" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-Width="10%">
<asp:TemplateField ItemStyle-Width="5%">
<ItemTemplate>
<asp:CheckBox ID="chk" Checked="false" Visible="false" runat="server" />
<asp:Literal ID="LtlTip" runat="server" Text='<%# Eval("ConceptoTexto") %>' ></asp:Literal>
@@ -166,32 +198,28 @@
<asp:HyperLink ID="Hpl" runat="server" NavigateUrl='<%# String.Format("/Compras/Proveedores.aspx?CveProveedor={0}&Opt=3", Eval("CveProveedor"))%>' Text='<%# Eval("RazonSocial") %>'></asp:HyperLink>
<asp:Literal Text='<%# Eval("Moneda")%>' ID="LtMoneda" runat="server" Visible="false" />
</ItemTemplate>
<ControlStyle CssClass="Texto" />
<ItemStyle HorizontalAlign="Left" Width="250px" />
<ControlStyle CssClass="Texto" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha">
<ItemTemplate>
<asp:Literal ID="LitFechaDocumento" runat="server" Text='<%# Bind("FechaDocumento", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="25px" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Literal ID="LitImporte" runat="server" Text='<%# Bind("Importe", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="25px" HorizontalAlign="Right" />
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Transacción">
<ItemTemplate>
<asp:Literal ID="LitTipoTransaccion" runat="server" Text='<%# Bind("TipoTransaccion")%>'></asp:Literal>
</ItemTemplate>
<ItemStyle Width="125px" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Folio">
<ItemTemplate>
<asp:HyperLink ID="HLFolio" runat="server" Target="_blank" Text='<%# Bind("Folio")%>' CssClass="Texto"></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="75px" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Saldo" ItemStyle-CssClass="fixMargin">
<ItemTemplate>
@@ -199,7 +227,7 @@
<asp:Literal runat="server" Text="&nbsp;&nbsp;"></asp:Literal>
</ItemTemplate>
<ItemStyle Width="65px" Font-Bold="True" HorizontalAlign="Right" />
<ItemStyle Font-Bold="True" HorizontalAlign="Right" />
</asp:TemplateField>
</Columns>

View File

@@ -2,10 +2,9 @@
Option Strict On
Imports System.Data
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports System.Linq
Partial Class Bancos_RepEgresosSinComprobante
Inherits ClsPaginas
@@ -61,6 +60,8 @@ Partial Class Bancos_RepEgresosSinComprobante
DdlProveedores.SelectedValue = "-1"
CargaDatos()
TxtConcepto.Text = "Saldado de Egresos por comprobar"
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubproyecto, AplicaTodos:="Selecione uno")
End If
End Sub
@@ -171,14 +172,19 @@ Partial Class Bancos_RepEgresosSinComprobante
End Sub
Private Sub LnkHabilitarSaldar_Click(sender As Object, e As EventArgs) Handles LnkHabilitarSaldar.Click
For Each gr As GridViewRow In GvESC.Rows
If gr.DataKey("CveIE") <> "" Then
gr.FCCheckBox("Chk").Visible = True
LnkSaldar.Visible = True
LnkHabilitarSaldar.Visible = False
UPDatos.Update()
End If
Next
TxtConcepto.Text = "Saldo de Egresos por comprobar"
DVSaldar.Visible = True
UpSaldar.Update()
End Sub
Private Sub LnkHabilitarSaldoFyE_Click(sender As Object, e As EventArgs) Handles LnkHabilitarSaldarFyE.Click
For Each gr As GridViewRow In GvPersonal.Rows
@@ -193,85 +199,96 @@ Partial Class Bancos_RepEgresosSinComprobante
Protected Sub LnkSaldar_Click(sender As Object, e As EventArgs)
Dim Contador As Integer = 0
For Each gr As GridViewRow In GvESC.Rows
If gr.FCCheckBox("Chk").Checked Then
Contador += 1
End If
Next
If Not Contador > 0 Then
Alert("No se hay movimientos seleccionados")
Exit Sub
End If
Dim ObjConta As New ClsContabilidad
Dim ObjProveedor As New ClsCompProveedores(ObjConta.IniciaTransacSQL())
Dim EsContabilizable As Boolean = If(UsuarioActual.CveEmpresa.Contiene(13, 83), False, True)
Dim CvePrePoliza As Integer = 0
Dim MsgError As String = ""
Try
For Each gr As GridViewRow In GvESC.Rows
If gr.FCCheckBox("Chk").Checked Then
Dim IdCtaContable As Integer = 0
Dim TipoMovtoOtIngresos As Boolean = False
Dim TipoMovtoConcepto As Boolean = True
Dim CveConceptoContable As Integer
Select Case gr.DataKey("CveConceptoContable").ToEntero
Case 10
CveConceptoContable = 21
Case 28
CveConceptoContable = 29
TipoMovtoOtIngresos = False
TipoMovtoConcepto = True
Case 37
CveConceptoContable = 43
Case 42
CveConceptoContable = 41
Case 43
CveConceptoContable = 37
End Select
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, gr.DataKey("CveProveedor").ToEntero, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
If ObjProveedor.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjProveedor.IdCtaContProveedores
If Contador > 0 Then
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, 0, 0, 1, Now,
TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim ImporteSaldoGral As Decimal = 0
Dim TipoMovtoConcepto As Boolean = True
For Each gr As GridViewRow In GvESC.Rows
If gr.FCCheckBox("Chk").Checked Then
Dim ImporteSaldo As Decimal = gr.DataKey("Saldo").ToDecimal
Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(11, gr.DataKey("CveMoneda").ToEntero, True, gr.DataKey("CveTipoProveedor").ToEntero)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteSaldo, ImporteSaldo, ConPrepAplicacion.CveConcepto, gr.DataKey("Folio"), TxtConcepto.Text, -1,
CveIE:=gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
Exit For
End If
End If
If gr.DataKey("CveMoneda").ToEntero > 1 Then
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now,
"Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, IdCtaContable, -1,
gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
Exit For
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, gr.DataKey("CveIE").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=gr.DataKey("CveSubProyecto").ToEntero, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
Exit For
End If
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
Dim ImporteMN As Decimal = (ImporteSaldo * gr.DataKey("TipoCambio").ToDecimal - ImporteSaldo).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, ImporteMN, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, gr.DataKey("Folio"), TxtConcepto.Text, -1,
CveIE:=gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
ImporteME:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
Exit For
End If
ImporteSaldo += ImporteMN
End If
ImporteSaldoGral += ImporteSaldo
End If
Next
If MsgError = "" Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoConcepto, ImporteSaldoGral, ImporteSaldoGral, 211, "", TxtConcepto.Text, -1,
CveIE:=-1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, Contabilizable:=EsContabilizable) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
If MsgError = "" AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
MsgError = "Error al validar."
End If
End If
Next
Else
Alert("No se especificaron")
End If
Catch ex As Exception
MsgError = "Ocurrió un error al generar la prepoliza"
OnError(MsgError, ex)
End Try
If MsgError = "" Then
If MsgError = "" Then
'LnkSaldar.Visible = False
'LnkHabilitarSaldar.Visible = True
DVSaldar.Visible = False
ObjConta.Commit()
CargaDatos()
Alert("Los movimientos se saldaron correctamente.")
CargaDatos()
Alert(String.Format("Los movimientos se saldaron correctamente <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}' class='Texto'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
Else
ObjConta.RollBack()
Alert(MsgError, TipoMensaje.MsgError)
End If
LnkSaldar.Visible = False
LnkHabilitarSaldar.Visible = True
End If
ObjConta.Dispose()
ObjProveedor.Dispose()
End Sub

View File

@@ -6613,9 +6613,6 @@ Partial Class Compras_Compras
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
If Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 2, UsuarioActual.CveUsuario) Then
ErrorMovInv = True
End If
If importeMovimiento > 0 Or TxtTotal.Text.ToDecimal = 0 Then
RegistroCuentaPuente = True
@@ -13692,74 +13689,11 @@ Partial Class Compras_Compras
End If
End If
ObjComprasComprobacion.Dispose()
Dim cvemovimientoentrada As Integer = -1
'DEVOLUCIÓN AUTOMATICA
If CheckDevAuto.Checked Then
Dim ErrorMovInv As Boolean = False
Dim folio As Integer
Dim fecha As Date = TxtFechaCancelacion.Text.ToDate
Dim importeconcepto As Decimal
Dim ObjInventario As New ClsInventarios
Dim ObjCompra As New ClsCompras
Dim tbmovs As DataTable = Nothing
Dim TmpDT As DataTable = Nothing
Dim TipoCambioGuardar As Decimal = 1
Dim tcvealmacen As Integer = 0
If ObjCompra.GetCompraDetalle(CveCompra, UsuarioActual.CveEmpresa) Then
If ObjCompra.DtResultados.Rows.Count > 0 Then
TmpDT = ObjCompra.DtResultados
End If
End If
If ObjInventario.GetInv_ComprasMov(CveCompra, UsuarioActual.CveEmpresa) Then
If ObjInventario.DtResultados.Rows.Count > 0 Then
tbmovs = ObjInventario.DtResultados
End If
End If
If DdlMoneda.SelectedValue.ToEntero > 1 Then
TipoCambioGuardar = If(DivTC.Visible, TxtTC.Text.ToDecimal, LblTC.Text.Substring(3).ToDecimal)
End If
TipoCambio = If(DivTC.Visible, TipoCambioGuardar, TipoCambio)
For Each dtMovs As DataRow In TmpDT.Rows
If TmpDT.Rows.Count > 0 Then
tcvealmacen = dtMovs("AlmacenRegistrado").ToString.ToEntero
Exit For
End If
Next
folio = ObjInventario.GetFolioSiguiente(13, UsuarioActual.CveEmpresa)
cvemovimientoentrada = ObjInventario.AddMovimiento(tcvealmacen, 13, 1, fecha, folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), Modulo:="Devolucion Automatica")
If cvemovimientoentrada <= 0 Then
ErrorMovInv = True
Else
For Each dr As DataRow In tbmovs.Rows
If dr("cvealmacen").ToString.ToEntero = tcvealmacen And dr("CveCompraDetalle").ToString.ToEntero <> -1 And dr("origen").ToString.ToEntero <> -1 And dr("Total").ToString.ToDecimal <> 0 Then
'hay que restarle descuento
importeconcepto = dr("Total").ToString.ToDecimal
If Not ObjInventario.AddMovimientoDetalle(cvemovimientoentrada, dr("cantidad").ToString.ToDouble, dr("cveum").ToString.ToEntero, dr("cveps").ToString.ToEntero, importeconcepto, -1, CveCompraDetalle:=dr("CveCompraDetalle").ToString.ToEntero, Serie:=dr("Serie").ToString) Then
ErrorMovInv = True
Exit Sub
End If
End If
Next
End If
If ErrorMovInv = True Then
ObjInventario.RollBack()
End If
ObjInventario.Dispose()
ObjCompra.Dispose()
End If
Dim ObjCompras As New ClsCompras
Dim ObjContabilidad As New ClsContabilidad(ObjCompras.IniciaTransacSQL())
Dim ObjInventario As New ClsInventarios(ObjCompras.IniciaTransacSQL())
Dim ObjAC As ClsContPAQi = Nothing
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
@@ -13767,21 +13701,128 @@ Partial Class Compras_Compras
ObjAC.IniciaTransacSQL()
End If
Dim ObjCompras As New ClsCompras
Dim ObjContabilidad As New ClsContabilidad(ObjCompras.IniciaTransacSQL())
Dim ErrorCancelar = False
Dim IdPolizaNueva = -1
Dim FolioPolizaNueva = -1
Dim CvePrePolizaNueva = -1
Dim dt As DataTable
Try
'DEVOLUCIÓN AUTOMATICA
If CheckDevAuto.Checked Then
Dim fecha As Date = TxtFechaCancelacion.Text.ToDateTime().AddHours(23).AddMinutes(59)
Dim importeconcepto As Decimal
Dim tbmovs As DataTable = Nothing
Dim TmpDT As DataTable = Nothing
Dim TipoCambioGuardar As Decimal = 1
' MES ANTERIOR, MOVIMIENTOS CONTRARIOS (NEGATIVOS)
If True Then
If ObjCompras.GetCompraDetalle(CveCompra, UsuarioActual.CveEmpresa) Then
If ObjCompras.DtResultados.Rows.Count > 0 Then
TmpDT = ObjCompras.DtResultados.Copy()
End If
End If
If ObjInventario.GetInv_ComprasMov(CveCompra, UsuarioActual.CveEmpresa) Then
If ObjInventario.DtResultados.Rows.Count > 0 Then
tbmovs = ObjInventario.DtResultados
End If
End If
If DdlMoneda.SelectedValue.ToEntero > 1 Then
TipoCambioGuardar = If(DivTC.Visible, TxtTC.Text.ToDecimal, LblTC.Text.Substring(3).ToDecimal)
End If
TipoCambio = If(DivTC.Visible, TipoCambioGuardar, TipoCambio)
'For Each dtMovs As DataRow In TmpDT.Rows
' If TmpDT.Rows.Count > 0 Then
' tcvealmacen = dtMovs("AlmacenRegistrado").ToString.ToEntero
' Exit For
' End If
'Next
Dim DtMovimientos = tbmovs.FiltraParametros("Origen = 1", DistinctColumns:={"CveMovimiento", "CveConcepto", "CveAlmacen", "Origen"})
For Each RowMovto As DataRow In DtMovimientos.Rows
Dim CveMovimientoEntrada As Integer = -1
Dim Folio As Integer
Dim CveAlmacen As Integer = RowMovto("CveAlmacen").ToString().ToEntero()
Dim CveConceptoDevolucion As Integer = -1
Dim CveConcetoEntrada = RowMovto("CveConcepto").ToString().ToEntero()
Dim CveMovimientoReferencia As Integer = RowMovto("CveMovimiento").ToString().ToEntero()
Select Case CveConcetoEntrada
Case 2
CveConceptoDevolucion = 13
End Select
Folio = ObjInventario.GetFolioSiguiente(CveConceptoDevolucion, UsuarioActual.CveEmpresa)
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoDevolucion, 1, fecha, Folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), Modulo:="Devolucion Automatica")
If CveMovimientoEntrada <= 0 Then
ErrorCancelar = True
Exit For
Else
For Each dr As DataRow In tbmovs.Rows
If dr("CveAlmacen").ToString.ToEntero = CveAlmacen And dr("CveCompraDetalle").ToString.ToEntero <> -1 And dr("origen").ToString.ToEntero <> -1 And dr("Total").ToString.ToDecimal <> 0 Then
'hay que restarle descuento
importeconcepto = dr("Total").ToString.ToDecimal
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, dr("Cantidad").ToString.ToDouble, dr("CveUM").ToString.ToEntero, dr("CvePS").ToString.ToEntero, importeconcepto, -1, CveCompraDetalle:=dr("CveCompraDetalle").ToString.ToEntero, Serie:=dr("Serie").ToString) Then
ErrorCancelar = True
Exit For
End If
End If
Next
End If
If CvePrePoliza > 0 Then
Dim Total68 As Decimal = 0
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
Total68 = ObjInventario.DtResultados.SUMD("Total").RoundSQL(2) * -1
End If
If ObjContabilidad.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
Dim DtPrePolizaAlmacen = ObjContabilidad.DtResultados.FiltraParametros($"CveMovimientoAlmacen = {CveMovimientoReferencia}")
CvePrePolizaNueva = ObjContabilidad.AddPrePolizas("Compras/Cancelar", DtPrePolizaAlmacen.Rows(0)("CvePlantillaPoliza").ToString.ToEntero, DtPrePolizaAlmacen.Rows(0)("Cargos").ToString.ToDouble * -1, DtPrePolizaAlmacen.Rows(0)("Abonos").ToString.ToDouble * -1, DtPrePolizaAlmacen.Rows(0)("CveMoneda").ToString.ToEntero, TxtFechaCancelacion.Text.ToDate, String.Format("Cancelación: {0}", DtPrePolizaAlmacen.Rows(0)("Concepto").ToString), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePolizaNueva > 0 Then
For Each dr As DataRow In DtPrePolizaAlmacen.Rows
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePolizaNueva, CBool(dr("TipoMovto").ToString), Total68, dr("Referencia").ToString, dr("CveConceptoContable").ToString.ToEntero,
dr("Concepto").ToString, TxtFechaCancelacion.Text.ToDate, dr("IdCtaContable").ToString.ToEntero, dr("IdSegmentoNegocio").ToString.ToEntero, dr("CveIE").ToString.ToEntero,
dr("CveVenta").ToString.ToEntero, dr("CveCompra").ToString.ToEntero, dr("CveSubProyecto").ToString.ToEntero, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero,
CveMovimientoEntrada,
dr("CveActivoFijo").ToString.ToEntero, -1, -1, dr("CveCreditoDetalle").ToString.ToEntero,
ImporteMX:=Total68, ImporteME:=Total68,
CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero,
PorcentajeImpuesto:=dr("PorcentajeImpuesto").ToString.ToDecimal,
CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero) Then
ErrorCancelar = True
Exit For
End If
Next
Else
ErrorCancelar = True
End If
Else
ErrorCancelar = True
End If
End If
Next
End If
Dim dt As DataTable
' MOVIMIENTOS CONTRARIOS (NEGATIVOS)
'CREA POLIZA NEGATIVA
If IdPoliza > 0 AndAlso ObjAC IsNot Nothing AndAlso UsuarioActual.Empresa.UsaAC Then
If Not ErrorCancelar AndAlso IdPoliza > 0 AndAlso ObjAC IsNot Nothing AndAlso UsuarioActual.Empresa.UsaAC Then
If ObjAC.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjAC.DtResultados.Rows.Count > 0 Then
dt = ObjAC.DtResultados
@@ -13809,47 +13850,21 @@ Partial Class Compras_Compras
End If
'CREA PRE-POLIZA NEGATIVA
If DdlTipoComprobante.SelectedValue.Contiene("NC") Then
If ObjCompras.GetCancelarNC(CveCompra, UsuarioActual.CveEmpresa) Then
dt = ObjCompras.DtResultados
CvePrePolizaNueva = ObjContabilidad.AddPrePolizas("Compras/Cancelar", dt.Rows(0)("CvePlantillaPoliza").ToString.ToEntero, dt.Rows(0)("Cargos").ToString.ToDouble * -1, dt.Rows(0)("Abonos").ToString.ToDouble * -1, dt.Rows(0)("CveMoneda").ToString.ToEntero, TxtFechaCancelacion.Text.ToDate, String.Format("Cancelación: {0}", dt.Rows(0)("Concepto").ToString), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePolizaNueva > 0 Then
For Each dr As DataRow In dt.Rows
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePolizaNueva, CBool(dr("TipoMovto").ToString), dr("Importe").ToString.ToDecimal * -1, dr("Referencia").ToString, dr("CveConceptoContable").ToString.ToEntero,
dr("Concepto").ToString, TxtFechaCancelacion.Text.ToDate, dr("IdCtaContable").ToString.ToEntero, dr("IdSegmentoNegocio").ToString.ToEntero, dr("CveIE").ToString.ToEntero,
dr("CveVenta").ToString.ToEntero, dr("CveCompra").ToString.ToEntero, dr("CveSubProyecto").ToString.ToEntero, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero,
dr("CveMovimientoAlmacen").ToString.ToEntero, dr("CveActivoFijo").ToString.ToEntero, -1, -1, dr("CveCreditoDetalle").ToString.ToEntero,
ImporteMX:=dr("Importe").ToString.ToDecimal * -1, ImporteME:=dr("Importe").ToString.ToDecimal * -1, CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero,
PorcentajeImpuesto:=dr("PorcentajeImpuesto").ToString.ToDecimal, CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero,
CveCompraAmortizacion:=dr("CveCompraAmortizacion").ToString.ToEntero) Then
ErrorCancelar = True
Exit For
End If
Next
Else
ErrorCancelar = True
End If
Else
ErrorCancelar = True
End If
Else
If CvePrePoliza > 0 Then
If ObjContabilidad.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
dt = ObjContabilidad.DtResultados
If Not ErrorCancelar Then
If DdlTipoComprobante.SelectedValue.Contiene("NC") Then
If ObjCompras.GetCancelarNC(CveCompra, UsuarioActual.CveEmpresa) Then
dt = ObjCompras.DtResultados
CvePrePolizaNueva = ObjContabilidad.AddPrePolizas("Compras/Cancelar", dt.Rows(0)("CvePlantillaPoliza").ToString.ToEntero, dt.Rows(0)("Cargos").ToString.ToDouble * -1, dt.Rows(0)("Abonos").ToString.ToDouble * -1, dt.Rows(0)("CveMoneda").ToString.ToEntero, TxtFechaCancelacion.Text.ToDate, String.Format("Cancelación: {0}", dt.Rows(0)("Concepto").ToString), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePolizaNueva > 0 Then
For Each dr As DataRow In dt.Rows
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePolizaNueva, CBool(dr("TipoMovto").ToString), dr("Importe").ToString.ToDecimal * -1, dr("Referencia").ToString, dr("CveConceptoContable").ToString.ToEntero,
dr("Concepto").ToString, TxtFechaCancelacion.Text.ToDate, dr("IdCtaContable").ToString.ToEntero, dr("IdSegmentoNegocio").ToString.ToEntero, dr("CveIE").ToString.ToEntero,
dr("CveVenta").ToString.ToEntero, dr("CveCompra").ToString.ToEntero, dr("CveSubProyecto").ToString.ToEntero, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero,
If(cvemovimientoentrada > 0, cvemovimientoentrada, dr("CveMovimientoAlmacen").ToString.ToEntero),
dr("CveActivoFijo").ToString.ToEntero, -1, -1, dr("CveCreditoDetalle").ToString.ToEntero,
ImporteMX:=dr("Importe").ToString.ToDecimal * -1, ImporteME:=dr("Importe").ToString.ToDecimal * -1,
CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero,
PorcentajeImpuesto:=dr("PorcentajeImpuesto").ToString.ToDecimal,
CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero) Then
dr("Concepto").ToString, TxtFechaCancelacion.Text.ToDate, dr("IdCtaContable").ToString.ToEntero, dr("IdSegmentoNegocio").ToString.ToEntero, dr("CveIE").ToString.ToEntero,
dr("CveVenta").ToString.ToEntero, dr("CveCompra").ToString.ToEntero, dr("CveSubProyecto").ToString.ToEntero, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero,
dr("CveMovimientoAlmacen").ToString.ToEntero, dr("CveActivoFijo").ToString.ToEntero, -1, -1, dr("CveCreditoDetalle").ToString.ToEntero,
ImporteMX:=dr("Importe").ToString.ToDecimal * -1, ImporteME:=dr("Importe").ToString.ToDecimal * -1, CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero,
PorcentajeImpuesto:=dr("PorcentajeImpuesto").ToString.ToDecimal, CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero,
CveCompraAmortizacion:=dr("CveCompraAmortizacion").ToString.ToEntero) Then
ErrorCancelar = True
Exit For
End If
@@ -13860,64 +13875,53 @@ Partial Class Compras_Compras
Else
ErrorCancelar = True
End If
End If
End If
Else
If CvePrePoliza > 0 Then
If ObjContabilidad.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
dt = ObjContabilidad.DtResultados.FiltraParametros("ISNULL(CveMovimientoAlmacen,0) <=0")
'MES ACTUAL
Else
'LIMPIA POLIZA PONIENDO IMPORTE EN CEROS
If IdPoliza > 0 AndAlso ObjAC IsNot Nothing Then
If ObjAC.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjAC.DtResultados.Rows.Count > 0 Then
dt = ObjAC.DtResultados
For Each dr As DataRow In dt.Rows
If Not ObjAC.UpdateMovimiento(dr("Id").ToString.ToEntero, dr("IdCuenta").ToString.ToEntero, dr("TipoMovto").ToString = "1", 0, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegNeg").ToString.ToEntero, dr("Fecha").ToString.ToDate) Then
ErrorCancelar = True : Exit For
End If
Next
'AJUSTA POLIZA
If Not ErrorCancelar Then
If Not ObjAC.AjustaPoliza(IdPoliza) Then
CvePrePolizaNueva = ObjContabilidad.AddPrePolizas("Compras/Cancelar", dt.Rows(0)("CvePlantillaPoliza").ToString.ToEntero, dt.Rows(0)("Cargos").ToString.ToDouble * -1, dt.Rows(0)("Abonos").ToString.ToDouble * -1, dt.Rows(0)("CveMoneda").ToString.ToEntero, TxtFechaCancelacion.Text.ToDate, String.Format("Cancelación: {0}", dt.Rows(0)("Concepto").ToString), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePolizaNueva > 0 Then
For Each dr As DataRow In dt.Rows
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePolizaNueva, CBool(dr("TipoMovto").ToString), dr("Importe").ToString.ToDecimal * -1, dr("Referencia").ToString, dr("CveConceptoContable").ToString.ToEntero,
dr("Concepto").ToString, TxtFechaCancelacion.Text.ToDate, dr("IdCtaContable").ToString.ToEntero, dr("IdSegmentoNegocio").ToString.ToEntero, dr("CveIE").ToString.ToEntero,
dr("CveVenta").ToString.ToEntero, dr("CveCompra").ToString.ToEntero, dr("CveSubProyecto").ToString.ToEntero, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero,
dr("CveMovimientoAlmacen").ToString.ToEntero,
dr("CveActivoFijo").ToString.ToEntero, -1, -1, dr("CveCreditoDetalle").ToString.ToEntero,
ImporteMX:=dr("Importe").ToString.ToDecimal * -1, ImporteME:=dr("Importe").ToString.ToDecimal * -1,
CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero,
PorcentajeImpuesto:=dr("PorcentajeImpuesto").ToString.ToDecimal,
CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero) Then
ErrorCancelar = True
Exit For
End If
Next
Else
ErrorCancelar = True
End If
Else
ErrorCancelar = True
End If
End If
End If
End If
Else
If Not ErrorCancelar Then
If Not ObjCompras.CancelarCompraOC(CveCompra, UsuarioActual.CveEmpresa) Then
ErrorCancelar = True
End If
End If
'LIMPIA PRE-POLIZA PONIENDO IMPORTE EN CEROS
If CvePrePoliza > 0 Then
If ObjContabilidad.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
dt = ObjContabilidad.DtResultados
For Each dr As DataRow In dt.Rows
If Not ObjContabilidad.UpdatePrePolizasDetalle(dr("CvePrePolizaDetalle").ToString.ToEntero, dr("Concepto").ToString, dr("CveSubProyecto").ToString.ToEntero, dr("IdCtaContable").ToString.ToEntero, CBool(dr("TipoMovto").ToString), 0, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorCancelar = True : Exit For
End If
Next
Else
'CANCELA COMPRA
If Not ErrorCancelar Then
If Not ObjCompras.UpdateEstatusCompra(CveCompra, -2) Then
ErrorCancelar = True
End If
End If
End If
If Not ErrorCancelar Then
If Not ObjCompras.CancelarCompraOC(CveCompra, UsuarioActual.CveEmpresa) Then
ErrorCancelar = True
End If
End If
'CANCELA COMPRA
If Not ErrorCancelar Then
If Not ObjCompras.UpdateEstatusCompra(CveCompra, -2) Then
ErrorCancelar = True
End If
End If
Catch ex As Exception
OnError("Ocurrió un error al cancelar la compra", ex)
ErrorCancelar = True
End Try
If Not ErrorCancelar Then
If ObjAC IsNot Nothing Then
@@ -20451,6 +20455,7 @@ Partial Class Compras_Compras
nRowAgrupado("PS") = psPSCodigo
nRowAgrupado("CveClasificacion") = psCveClasificacion
nRowAgrupado("Clasificacion") = psClasificacion
nRowAgrupado("CveTipoPS") = rowPS("CveTipoPS").ToString
nRowAgrupado("IVAPorcentaje") = drIva("IVAPorcentaje")
nRowAgrupado("RetIVAPorcentaje") = drIva("RetIVAPorcentaje")
@@ -20514,6 +20519,7 @@ Partial Class Compras_Compras
dRow91_5("PS") = psPSCodigo
dRow91_5("CveClasificacion") = psCveClasificacion
dRow91_5("Clasificacion") = psClasificacion
dRow91_5("CveTipoPS") = rowPS("CveTipoPS").ToString
dRow91_5("Consec") = Consec + 1
dRow91_5("PU") = dRow91_5("PU").ToString.ToDecimal * Mul91_5
@@ -20535,6 +20541,12 @@ Partial Class Compras_Compras
Consec = Consec + 2
Next
DTProtateo.AcceptChanges()
'recorrer
If CveCompra > 0 Then
For Each dbrow As DataRow In TmpDT.Rows
ClavesBorradas.Add(dbrow("CveCompraDetalle").ToString.ToEntero)
Next
End If
TmpDT = DTProtateo
BtnProrateoDeducible.Visible = False

View File

@@ -5782,8 +5782,12 @@ Partial Class PopUpVerFactura
Dim EstadoCancelacion = drv("EstadoCancelacion").ToString()
Dim FechaCancelacion = drv("FechaCancelacion").ToString.ToDateTime
Dim MotivoCancelacion As String = "" ' drv("MotivoCancelacion").ToString()
Dim FolioSustitucion As String = "" ' drv("FolioFiscalPadre").ToString()
Dim DirectorioArchivo As String = String.Format("{0}Empresas\Grales\Formatos\AcuseCancelacion.mrt", ModExtensiones.DirectorioBaseEmpresas)
Dim RFCEmisor = UsuarioActual.Empresa.RFC
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Empresas\Grales\Formatos\AcuseCancelacion.rdlc", ModExtensiones.DirectorioBaseEmpresas))
Dim Titulo As String = "Acuse de cancelación de CFDI"
Dim EstadoCFDI As String = "Cancelado"
@@ -5802,9 +5806,27 @@ Partial Class PopUpVerFactura
End If
If CveEstatusFactura = 20 Then
DirectorioArchivo = String.Format("{0}Empresas\Grales\Formatos\AcuseCancelacionSolicitud.mrt", ModExtensiones.DirectorioBaseEmpresas)
Titulo = "Acuse de solicitud de cancelación de CFDI"
EstadoCFDI = "Vigente"
Using ObjV As New ClsVentas
If ObjV.GetVentasPendientesCancelacion(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CveVenta:=CveVenta) Then
Dim RowCancelacion = ObjV.DtResultados.FiltroPrimero("")
If RowCancelacion IsNot Nothing Then
Dim CveMotivoCancelacion = RowCancelacion("CveMotivoCancelacion").ToString().ToEntero()
FolioSustitucion = RowCancelacion("FolioFiscalSustitucion").ToString()
If CveMotivoCancelacion > 0 Then
MotivoCancelacion = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveMotivoCancelacion:=CveMotivoCancelacion).FiltroPrimeroValor("CodigoSATDescripcion")
End If
End If
End If
End Using
'SI TIENE DATOS EN EL SELLO DE SOLICITUD Y ESTA EN PROCESO, ENVIAR ESTE SELLO
If Not String.IsNullOrEmpty(SelloSolicitudCancelacion) Then
SelloCancelacion = SelloSolicitudCancelacion
@@ -5829,6 +5851,8 @@ Partial Class PopUpVerFactura
End If
End If
Dim Archivo As New System.IO.FileInfo(DirectorioArchivo)
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Titulo", Titulo))
params.Add(New ReportParameter("FolioFiscal", FolioFiscal))
@@ -5840,7 +5864,29 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("MsgError", ""))
params.Add(New ReportParameter("FechaCancelacion", FechaCancelacion.ToString("dd/MM/yyyy HH:mm:ss")))
ImprimirPDF(Archivo.FullName, DtDetalle, params, "AcuseCancelacion" & CveVenta)
'ImprimirPDF(Archivo.FullName, DtDetalle, params, "AcuseCancelacion" & CveVenta)
Dim DtAcuse As DataTable = Nothing
If CveEstatusFactura = 20 Then
DtAcuse = New DataTable("DtAcuse")
DtAcuse.Columns.Add(New DataColumn("FolioFiscal", GetType(String)))
DtAcuse.Columns.Add(New DataColumn("Estatus", GetType(String)))
DtAcuse.Columns.Add(New DataColumn("MotivoCancelacion", GetType(String)))
DtAcuse.Columns.Add(New DataColumn("FolioSustitucion", GetType(String)))
Dim RowCFDI = DtAcuse.NewRow()
RowCFDI("FolioFiscal") = FolioFiscal
RowCFDI("Estatus") = "Solicitud de cancelación recibida"
RowCFDI("MotivoCancelacion") = MotivoCancelacion
RowCFDI("FolioSustitucion") = FolioSustitucion
DtAcuse.Rows.Add(RowCFDI)
End If
ImprimirPDFStimulsoft(Archivo.FullName, DtAcuse, params, "AcuseCancelacion" & CveVenta)
End If

View File

@@ -82,9 +82,9 @@ Partial Class AC2_RepAnexoCatalogo
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa <> 119 Then
Response.Redirect($"/Contabilidad/RepAnexoCatalogo.aspx")
End If
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa <> 119 Then
' Response.Redirect($"/Contabilidad/RepAnexoCatalogo.aspx")
'End If
Dim ErrorParametros = True
DtDatos = Nothing

View File

@@ -97,9 +97,9 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa <> 119 Then
Response.Redirect($"/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx")
End If
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.CveEmpresa <> 119 Then
' Response.Redirect($"/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx")
'End If
Dim ErrorParametros = True

File diff suppressed because it is too large Load Diff

View File

@@ -2984,7 +2984,7 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<Width>19.59037cm</Width>
<Page>
<PageHeader>
<Height>6.48735cm</Height>
<Height>6.74082cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -3478,9 +3478,9 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<Paragraph>
<TextRuns>
<TextRun>
<Value>Serie/Folio:</Value>
<Value>Serie/Folio</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>Brown</Color>
</Style>
@@ -3492,7 +3492,7 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<rd:DefaultName>Textbox31</rd:DefaultName>
<Left>0.00031cm</Left>
<Height>0.47652cm</Height>
<Width>1.90028cm</Width>
<Width>1.72389cm</Width>
<ZIndex>7</ZIndex>
<Style>
<Border>
@@ -3513,7 +3513,7 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<TextRun>
<Value>=First(Fields!Serie.Value, "Comprobante") + " - " + First(Fields!Folio.Value, "Comprobante")</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -3521,9 +3521,9 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox32</rd:DefaultName>
<Left>1.90059cm</Left>
<Left>1.75948cm</Left>
<Height>0.47652cm</Height>
<Width>2.86701cm</Width>
<Width>3.00812cm</Width>
<ZIndex>8</ZIndex>
<Style>
<Border>
@@ -3788,8 +3788,8 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<rd:DefaultName>Textbox43</rd:DefaultName>
<Top>1.71005cm</Top>
<Left>0.00035cm</Left>
<Height>0.56193cm</Height>
<Width>9.99712cm</Width>
<Height>0.27936in</Height>
<Width>3.93587in</Width>
<ZIndex>6</ZIndex>
<Style>
<Border>
@@ -3890,8 +3890,8 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<rd:DefaultName>Textbox43</rd:DefaultName>
<Top>1.71005cm</Top>
<Left>9.99747cm</Left>
<Height>0.56193cm</Height>
<Width>9.59253cm</Width>
<Height>0.27936in</Height>
<Width>3.77637in</Width>
<ZIndex>9</ZIndex>
<Style>
<Border>
@@ -3908,7 +3908,7 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P
<KeepTogether>true</KeepTogether>
<Top>4.21537cm</Top>
<Left>0.00007cm</Left>
<Height>2.27198cm</Height>
<Height>2.41961cm</Height>
<Width>19.59023cm</Width>
<ZIndex>9</ZIndex>
<Style>
@@ -4347,7 +4347,6 @@ First(Fields!NoCertificadoSAT.Value, "TimbreFiscalDigital")</Value>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox25</rd:DefaultName>
<Top>0cm</Top>
<Left>1.5001in</Left>
<Height>0.15625in</Height>
<Width>6.2125in</Width>
@@ -4444,7 +4443,7 @@ First(Fields!NoCertificadoSAT.Value, "TimbreFiscalDigital")</Value>
<Style />
</Page>
</ReportSection>
</ReportSections>
</ReportSections>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>01f5892c-0046-409e-9fb9-7645ea4fa54f</rd:ReportID>
</Report>

View File

@@ -1929,7 +1929,7 @@ Partial Class Inventarios_EntradasSalidas
Else
'Dim Total As Decimal = 0
If CveConceptoContable.Contiene(181, 78, 51) Then
If CveConceptoContable.Contiene(181, 78, 51, 69) Then
Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy
'Dim IdCuentaGasto As Integer = 0
For Each Dr As DataRow In Dt.Rows

View File

@@ -208,7 +208,7 @@
<asp:UpdatePanel ID="UpBuscar" runat="server" RenderMode="Inline" ViewStateMode="Inherit" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-3">
<asp:Panel ID="Panel1" runat="server" DefaultButton="BtnBuscarCodVarras">
<asp:Panel ID="Panel1" runat="server" DefaultButton="BtnBuscarCodBarras">
<div class="portlet smmallpadding light bordered" id="Div2" runat="server">
<div class="portlet-title">
<div class="tools">
@@ -223,10 +223,10 @@
<div class="row" style="margin-top: 5px;">
<label class="col-sm-4">Código.Barras</label>
<div class="col-sm-4">
<asp:TextBox runat="server" CssClass="form-control" ID="TxtConCodigoVarras"></asp:TextBox>
<asp:TextBox runat="server" CssClass="form-control" ID="TxtConCodigoBarras"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:Button ID="BtnBuscarCodVarras" OnClick="BtnBuscarCodVarras_Click" runat="server" Text="Consultar" class="btn btn-primary" Enabled="true" />
<asp:Button ID="BtnBuscarCodBarras" OnClick="BtnBuscarCodBarras_Click" runat="server" Text="Consultar" class="btn btn-primary" Enabled="true" />
</div>
</div>
<div class="row" style="margin-top: 5px;">

View File

@@ -687,13 +687,13 @@ Partial Class Inventarios_InventarioFisicoDetalle
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
Next
NombreArchivo = "Productos"
NombreArchivo = "Productos-" + lbTitulo.Text
workbook.Save(Response, $"{NombreArchivo}.xlsx", SaveOptions.XlsxDefault)
End Sub
#End Region
Protected Sub BtnBuscarCodVarras_Click(sender As Object, e As EventArgs)
Dim CodigoBarras As String = If(TxtConCodigoVarras.Text.Trim <> "", TxtConCodigoVarras.Text.Trim, "-1").Replace("'", "''")
Protected Sub BtnBuscarCodBarras_Click(sender As Object, e As EventArgs)
Dim CodigoBarras As String = If(TxtConCodigoBarras.Text.Trim <> "", TxtConCodigoBarras.Text.Trim, "-1").Replace("'", "''")
LblContador.Text = "No se encontraron resultados"
Using Inventarios As New ClsInventarios
If Inventarios.GetInventarioFisicoContador(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero, CodigoBarras) Then

View File

@@ -267,7 +267,7 @@ Partial Class Inventarios_KardexAlmacen
If DdlProveedor.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat("Proveedor: {0},", DdlProveedor.SelectedText)
If ddlProducto2.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat(" Producto/Servicio: {0},", ddlProducto2.SelectedText)
If TxtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin: {0}", TxtFechaF.Text)
ExportToExcelG(GvDatos, "ExistenciasHorizontal.xlsx", "Existencias Almacen", UsuarioActual, StrFiltro.ToString, 100, 200)
ExportToExcelG(GvDatos, "ExistenciasHorizontal_" & TxtFechaF.Text, "Existencias Almacen", UsuarioActual, StrFiltro.ToString, 100, 200)
Else
Alert("Debe consultar para generar un excel", TipoMensaje.MsgAdvertencia)
End If

View File

@@ -78,7 +78,7 @@
<asp:UpdatePanel ID="UpGenerales" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="col-md-6">
<div class="portlet smmallpadding light bordered infomov" style="width: 100%">
<div class="portlet smmallpadding light xspadding bordered infomov" style="width: 100%">
<div class="portlet-title">
<div class="tools">
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
@@ -92,7 +92,6 @@
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
<div id="tbEncabezado" runat="server" class="rowpadding" visible="true">
<div class="row" style="display: none;">
<label class="col-md-1 truncate" style="width: 110px">Movimiento:</label>
<div class="col-md-2">
<asp:RadioButtonList runat="server" ID="RBLOpcion" RepeatDirection="Horizontal" AutoPostBack="true" Font-Size="18pt">
@@ -100,7 +99,6 @@
<asp:ListItem Value="3">Salida</asp:ListItem>
</asp:RadioButtonList>
</div>
</div>
<div class="row" style="margin-left: 105px">
<asp:RadioButtonList runat="server" ID="RblUsadosAjuste" RepeatDirection="Horizontal" AutoPostBack="true" Font-Size="18pt" Width="70%" OnSelectedIndexChanged="OnRblUsadosAjuste_Change">
@@ -192,9 +190,9 @@
</div>
</div>
</div>
<label class="col-md-1 truncate" style="width: 110px" id="DivFolio1" runat="server">Folio:</label>
<label class="col-md-1 truncate" style="width: 80px" id="DivFolio1" runat="server">Folio:</label>
<div class="col-md-2" id="DivFolio2" runat="server">
<asp:TextBox ID="TxtFolio" runat="server" Style="" Width="100%"></asp:TextBox>
<asp:TextBox ID="TxtFolio" runat="server" Style="" Width="100px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumerosFolio" runat="server" TargetControlID="TxtFolio" FilterType="Numbers" />
</div>
</div>

View File

@@ -3089,7 +3089,7 @@ Partial Class Inventarios_RecepcionUsados
End If
DdlTipoUso.Items.Clear()
DdlTipoUso.DataSource = GlobalDTAcumGarantiasMesesTipoUso(UsuarioActual.CveEmpresa, CveMarca)
DdlTipoUso.DataSource = GlobalDTAcumGarantiasTipoUso(UsuarioActual.CveEmpresa, CveMarca, -1)
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlTipoUso.DataBind()
@@ -3246,10 +3246,11 @@ Partial Class Inventarios_RecepcionUsados
CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
If ObjAcum.DtResultados.Rows.Count > 0 Then
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100.0).FormatoNumero
Dim dtt As DataTable = GlobalDTAcumGarantiasTipoUsoMeses(UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero)
If dtt IsNot Nothing Then
If dtt.Rows.Count > 0 Then
TxtPorcentajeAjuste.Text = (dtt.Rows(0)("Valor").ToString.ToDouble / 100.0).FormatoNumero
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero
@@ -3293,7 +3294,7 @@ Partial Class Inventarios_RecepcionUsados
TxtImporteAjuste.Text = "0.00"
End If
End If
ObjAcum.Dispose()
End If
Catch ex As Exception
OnError("Ocurrió un error al recalcular el costo", ex)

View File

@@ -223,6 +223,20 @@ Partial Class LogIn
If Usuario IsNot Nothing Then
If Not Usuario.AutorizadoxIP OrElse (HddAdsCodex.Text.Length > 0 AndAlso Usuario.CodigoAutorizado = HddAdsCodex.Text) Then
If Usuario.CveRol = 1 Then
Dim tcveEmpresa As Integer = Usuario.CveEmpresa
If Request.Url.Host.ToUpper().Contains("BDH".ToUpper()) Then tcveEmpresa = 140
If Request.Url.Host.ToUpper().Contains("ECONOLLANTAS".ToUpper()) Then tcveEmpresa = 141
If Request.Url.Host.ToUpper().Contains("JAM".ToUpper()) Then tcveEmpresa = 119
If Request.Url.Host.ToUpper().Contains("CITRUS".ToUpper()) Then tcveEmpresa = 172
If Request.Url.Host.ToUpper().Contains("KINO".ToUpper()) Then tcveEmpresa = 173
If Request.Url.Host.ToUpper().Contains("VSH".ToUpper()) Then tcveEmpresa = 7
If Request.Url.Host.ToUpper().Contains("AJAM".ToUpper()) Then tcveEmpresa = 158
If Request.Url.Host.ToUpper().Contains("ALATEL".ToUpper()) Then tcveEmpresa = 183
If Request.Url.Host.ToUpper().Contains("SERVEC".ToUpper()) Then tcveEmpresa = 153
If Request.Url.Host.ToUpper().Contains("EMD".ToUpper()) Then tcveEmpresa = 13
Usuario.CveEmpresa = tcveEmpresa
End If
CreaObjetoEmpresa(Usuario)
ADSSessionConfig.sessionUser.MultipleEmpresa = True

View File

@@ -211,7 +211,7 @@
<asp:Label runat="server" ID="LblPrioridad" Text="Prioridad:" class="col-md-2" /></b>
<div class="col-md-4" id="DivPrioridad" runat="server">
<asp:DropDownList ID="DdlPrioridad" CssClass="select2me" runat="server" Width="150px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Text="Alta" Value="1"></asp:ListItem>
<asp:ListItem Text="Media" Value="2"></asp:ListItem>
<asp:ListItem Text="Baja" Value="3"></asp:ListItem>
@@ -237,7 +237,7 @@
<div class="row" style="padding-bottom: 0.6em;">
<label class="col-md-2">Descripción:</label>
<div class="col-md-10">
<asp:TextBox ID="TxtDescrip" CssClass="form-control input-sm" runat="server" Width="370px" ValidationGroup="GrpGuardar" />
<asp:TextBox ID="TxtDescrip" CssClass="form-control input-sm" runat="server" Width="95%" ValidationGroup="GrpGuardar" />
<asp:RequiredFieldValidator ID="RFVDescrip" runat="server" ControlToValidate="TxtDescrip" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDescrip" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVDescrip" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
@@ -246,7 +246,7 @@
<div class="row" style="padding-bottom: 0.6em;">
<label class="col-md-2">Justificación:</label>
<div class="col-md-10">
<asp:TextBox ID="TxtJustificacion" CssClass="form-control input-sm" runat="server" Style="width: 370px; height: 40px;" ValidationGroup="GrpGuardar" TextMode="MultiLine" Rows="5" />
<asp:TextBox ID="TxtJustificacion" CssClass="form-control input-sm" runat="server" Style="width: 95%; height: 40px;" ValidationGroup="GrpGuardar" TextMode="MultiLine" Rows="5" />
<asp:RequiredFieldValidator ID="RFVJustif" runat="server" ControlToValidate="TxtJustificacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Justificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEJustificacion" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="RFVJustif" Width="300px">
</ajax:ValidatorCalloutExtender>

View File

@@ -5309,7 +5309,7 @@ Partial Class OC_OC
If UsuarioActual.Empresa.Funcionalidad(108) = "1" Then
DivVendedor.Visible = True
option72.Visible = True
'option72.Visible = True
DivFolioAdicional.Visible = True
generarAnticipo.Visible = True
'Ddlcliente.DataSource = GlobalDTCliente(CveEmpresaActual)

View File

@@ -958,7 +958,7 @@
var Tam = TamañoVentana();
var Alto = Tam.height - 400;
$(".sidebar-toggler-wrapper").remove();
//$(".sidebar-toggler-wrapper").remove();
$('#<%=GvBancosCuentas.ClientID%>').DataTable({ scrollY: Alto + 'px', scrollCollapse: true, paging: false, searching: false, info: false, order: [[1, "desc"]] });

View File

@@ -74,7 +74,7 @@
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FechaIng" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
<ItemTemplate>
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" OnClick="Edit_Click" Text="<i class='fa fa-pencil'></i>" />
@@ -112,61 +112,99 @@
<asp:DropDownList ID="DdlChecadorHorario" DataValueField="CveChecadorHorario" DataTextField="ChecadorHorario" runat="server" CssClass="form-control select2me" Width="150px"></asp:DropDownList>
<label for="<%= DdlChecadorHorario.ClientID.ToString()%>">Checador de Horario:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtHorarioDe" runat="server" CausesValidation="true" CssClass="form-control" MaxLength="10" Width="104px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVHorarioDe" runat="server" ControlToValidate="TxtHorarioDe" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Entrada''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOHorarioDe1" runat="server" HighlightCssClass="vco" TargetControlID="RFVHorarioDe" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:MaskedEditExtender ID="MEEHorarioDe" runat="server" TargetControlID="TxtHorarioDe" Mask="99:99:99" MaskType="Time" InputDirection="RightToLeft"></ajax:MaskedEditExtender>
<ajax:MaskedEditValidator ID="MEVHorarioDe" runat="server" ControlExtender="MEEHorarioDe" ControlToValidate="TxtHorarioDe" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Entrada''</b> no tiene el formato correcto, por favor corrija (Formato 24 Horas)." IsValidEmpty="true" MaximumValue="23:59:59" MinimumValue="00:00:00" ToolTip="Formato 24 Horas" ValidationGroup="GrpObligatorio"></ajax:MaskedEditValidator>
<ajax:ValidatorCalloutExtender ID="VCOHorarioDe2" runat="server" HighlightCssClass="vco" TargetControlID="MEVHorarioDe"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtHorarioDe.ClientID.ToString()%>">Hora de Entrada:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtHorarioA" runat="server" CausesValidation="true" CssClass="form-control" MaxLength="10" Width="84px" ValidationGroup="GrpObligatorio"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVHorarioA" runat="server" ControlToValidate="TxtHorarioA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Salida''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOHorarioA1" runat="server" HighlightCssClass="vco" TargetControlID="RFVHorarioA" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:MaskedEditExtender ID="MEEHorarioA" runat="server" TargetControlID="TxtHorarioA" Mask="99:99:99" MaskType="Time" InputDirection="RightToLeft"></ajax:MaskedEditExtender>
<ajax:MaskedEditValidator ID="MEVHorarioA" runat="server" ControlExtender="MEEHorarioA" ControlToValidate="TxtHorarioA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Salida''</b> no tiene el formato correcto, por favor corrija (Formato 24 Horas)." IsValidEmpty="true" MaximumValue="23:59:59" MinimumValue="00:00:00" ToolTip="Formato 24 Horas" ValidationGroup="GrpObligatorio"></ajax:MaskedEditValidator>
<ajax:ValidatorCalloutExtender ID="VCOHorarioA2" runat="server" HighlightCssClass="vco" TargetControlID="MEVHorarioA"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtHorarioDe.ClientID.ToString()%>">Hora de Salida:</label>
<div class="row">
<div class="col-lg-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtHorarioDe" runat="server" CausesValidation="true" CssClass="form-control" MaxLength="10" Width="104px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVHorarioDe" runat="server" ControlToValidate="TxtHorarioDe" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Entrada''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOHorarioDe1" runat="server" HighlightCssClass="vco" TargetControlID="RFVHorarioDe" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:MaskedEditExtender ID="MEEHorarioDe" runat="server" TargetControlID="TxtHorarioDe" Mask="99:99:99" MaskType="Time" InputDirection="RightToLeft"></ajax:MaskedEditExtender>
<ajax:MaskedEditValidator ID="MEVHorarioDe" runat="server" ControlExtender="MEEHorarioDe" ControlToValidate="TxtHorarioDe" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Entrada''</b> no tiene el formato correcto, por favor corrija (Formato 24 Horas)." IsValidEmpty="true" MaximumValue="23:59:59" MinimumValue="00:00:00" ToolTip="Formato 24 Horas" ValidationGroup="GrpObligatorio"></ajax:MaskedEditValidator>
<ajax:ValidatorCalloutExtender ID="VCOHorarioDe2" runat="server" HighlightCssClass="vco" TargetControlID="MEVHorarioDe"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtHorarioDe.ClientID.ToString()%>">Hora de Entrada:</label>
</div>
</div>
<div class="col-lg-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtHorarioA" runat="server" CausesValidation="true" CssClass="form-control" MaxLength="10" Width="84px" ValidationGroup="GrpObligatorio"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVHorarioA" runat="server" ControlToValidate="TxtHorarioA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Salida''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOHorarioA1" runat="server" HighlightCssClass="vco" TargetControlID="RFVHorarioA" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:MaskedEditExtender ID="MEEHorarioA" runat="server" TargetControlID="TxtHorarioA" Mask="99:99:99" MaskType="Time" InputDirection="RightToLeft"></ajax:MaskedEditExtender>
<ajax:MaskedEditValidator ID="MEVHorarioA" runat="server" ControlExtender="MEEHorarioA" ControlToValidate="TxtHorarioA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Salida''</b> no tiene el formato correcto, por favor corrija (Formato 24 Horas)." IsValidEmpty="true" MaximumValue="23:59:59" MinimumValue="00:00:00" ToolTip="Formato 24 Horas" ValidationGroup="GrpObligatorio"></ajax:MaskedEditValidator>
<ajax:ValidatorCalloutExtender ID="VCOHorarioA2" runat="server" HighlightCssClass="vco" TargetControlID="MEVHorarioA"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtHorarioDe.ClientID.ToString()%>">Hora de Salida:</label>
</div>
</div>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="chkComida" runat="server" CssClass="form-control" />
<asp:CheckBox ID="chkComida" runat="server" CssClass="form-control" AutoPostBack="true" OnCheckedChanged="chkComida_CheckedChanged" />
<label for="<%= chkComida.ClientID.ToString()%>">Con Horario de comida:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtComidade" runat="server" CausesValidation="true" CssClass="form-control" MaxLength="10" Width="104px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVComidade" runat="server" ControlToValidate="TxtComidade" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Entrada''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOComidade1" runat="server" HighlightCssClass="vco" TargetControlID="RFVComidade" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:MaskedEditExtender ID="MEEComidade" runat="server" TargetControlID="TxtComidade" Mask="99:99:99" MaskType="Time" InputDirection="RightToLeft"></ajax:MaskedEditExtender>
<ajax:MaskedEditValidator ID="MEVComidade" runat="server" ControlExtender="MEEComidade" ControlToValidate="TxtComidade" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Entrada''</b> no tiene el formato correcto, por favor corrija (Formato 24 Horas)." IsValidEmpty="true" MaximumValue="23:59:59" MinimumValue="00:00:00" ToolTip="Formato 24 Horas" ValidationGroup="GrpObligatorio"></ajax:MaskedEditValidator>
<ajax:ValidatorCalloutExtender ID="VCOComidade2" runat="server" HighlightCssClass="vco" TargetControlID="MEVComidade"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtComidade.ClientID.ToString()%>">Hora de Comida Entrada:</label>
</div>
<div class="row" runat="server" id="DVHorarioComida" visible="false">
<div class="col-lg-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtComidade" runat="server" CausesValidation="true" CssClass="form-control" MaxLength="10" Width="104px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVComidade" runat="server" ControlToValidate="TxtComidade" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Entrada''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOComidade1" runat="server" HighlightCssClass="vco" TargetControlID="RFVComidade" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:MaskedEditExtender ID="MEEComidade" runat="server" TargetControlID="TxtComidade" Mask="99:99:99" MaskType="Time" InputDirection="RightToLeft"></ajax:MaskedEditExtender>
<ajax:MaskedEditValidator ID="MEVComidade" runat="server" ControlExtender="MEEComidade" ControlToValidate="TxtComidade" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Entrada''</b> no tiene el formato correcto, por favor corrija (Formato 24 Horas)." IsValidEmpty="true" MaximumValue="23:59:59" MinimumValue="00:00:00" ToolTip="Formato 24 Horas" ValidationGroup="GrpObligatorio"></ajax:MaskedEditValidator>
<ajax:ValidatorCalloutExtender ID="VCOComidade2" runat="server" HighlightCssClass="vco" TargetControlID="MEVComidade"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtComidade.ClientID.ToString()%>">Hora de Comida Entrada:</label>
</div>
</div>
<div class="col-lg-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtComidaA" runat="server" CausesValidation="true" CssClass="form-control" MaxLength="10" Width="104px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVComidaA" runat="server" ControlToValidate="TxtComidaA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Entrada''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOComidaA1" runat="server" HighlightCssClass="vco" TargetControlID="RFVComidaA" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:MaskedEditExtender ID="MEEComidaA" runat="server" TargetControlID="TxtComidaA" Mask="99:99:99" MaskType="Time" InputDirection="RightToLeft"></ajax:MaskedEditExtender>
<ajax:MaskedEditValidator ID="MEVComidaA" runat="server" ControlExtender="MEEComidaA" ControlToValidate="TxtComidaA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Entrada''</b> no tiene el formato correcto, por favor corrija (Formato 24 Horas)." IsValidEmpty="true" MaximumValue="23:59:59" MinimumValue="00:00:00" ToolTip="Formato 24 Horas" ValidationGroup="GrpObligatorio"></ajax:MaskedEditValidator>
<ajax:ValidatorCalloutExtender ID="VCOComidaA2" runat="server" HighlightCssClass="vco" TargetControlID="MEVComidaA"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtComidaA.ClientID.ToString()%>">Hora de Comida Salida:</label>
</div>
</div>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtComidaA" runat="server" CausesValidation="true" CssClass="form-control" MaxLength="10" Width="104px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVComidaA" runat="server" ControlToValidate="TxtComidaA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Entrada''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOComidaA1" runat="server" HighlightCssClass="vco" TargetControlID="RFVComidaA" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:MaskedEditExtender ID="MEEComidaA" runat="server" TargetControlID="TxtComidaA" Mask="99:99:99" MaskType="Time" InputDirection="RightToLeft"></ajax:MaskedEditExtender>
<ajax:MaskedEditValidator ID="MEVComidaA" runat="server" ControlExtender="MEEComidaA" ControlToValidate="TxtComidaA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hr. Entrada''</b> no tiene el formato correcto, por favor corrija (Formato 24 Horas)." IsValidEmpty="true" MaximumValue="23:59:59" MinimumValue="00:00:00" ToolTip="Formato 24 Horas" ValidationGroup="GrpObligatorio"></ajax:MaskedEditValidator>
<ajax:ValidatorCalloutExtender ID="VCOComidaA2" runat="server" HighlightCssClass="vco" TargetControlID="MEVComidaA"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtComidaA.ClientID.ToString()%>">Hora de Comida Salida:</label>
</div>
<asp:TextBox ID="TxtRetardo" runat="server" CausesValidation="true" CssClass="form-control" ValidationGroup="GrpObligatorio" MaxLength="3"></asp:TextBox>
<asp:Label AssociatedControlID="TxtRetardo" runat="server" Text="Tolerancia Entrada"></asp:Label>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtRetardo" FilterType="Numbers" />
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRetardo" runat="server" CausesValidation="true" CssClass="form-control" ValidationGroup="GrpObligatorio"></asp:TextBox>
<asp:Label AssociatedControlID="TxtRetardo" runat="server" Text="Tolerancia Entrada"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtFretardo" runat="server" CausesValidation="true" CssClass="form-control" ValidationGroup="GrpObligatorio"></asp:TextBox>
<asp:TextBox ID="TxtFretardo" runat="server" CausesValidation="true" CssClass="form-control" ValidationGroup="GrpObligatorio" MaxLength="3"></asp:TextBox>
<asp:Label AssociatedControlID="TxtFretardo" runat="server" Text="Retardo"></asp:Label>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtFretardo" FilterType="Numbers" />
<asp:CustomValidator ID="CVTxtFretardo" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtFretardo" ClientValidationFunction="validaRetardoEntrada"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br /> El campo Retardo debe de ser superior al campo Tolerancia Entrada." ValidationGroup="GrpObligatorio"></asp:CustomValidator>
</div>
<div class="form-group form-md-line-input input-iconright" runat="server" id="DvToleranciaSRetardo" visible="false">
<asp:TextBox ID="TxtToleranciaSRetardo" runat="server" CausesValidation="true" CssClass="form-control" ValidationGroup="GrpObligatorio" MaxLength="3"></asp:TextBox>
<asp:Label AssociatedControlID="TxtToleranciaSRetardo" runat="server" Text="Tolerancia salida Temprano"></asp:Label>
<asp:CustomValidator ID="CVTxtToleranciaSRetardo" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtToleranciaSRetardo" ClientValidationFunction="validaSalidaTemprano"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br /> El campo Tolerancia salida Temprano debe de ser menor al campo Tolerancia salida." ValidationGroup="GrpObligatorio"></asp:CustomValidator>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtToleranciaSRetardo" FilterType="Numbers" />
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtFsalida" runat="server" CausesValidation="true" CssClass="form-control" ValidationGroup="GrpObligatorio"></asp:TextBox>
<asp:TextBox ID="TxtFsalida" runat="server" CausesValidation="true" CssClass="form-control" ValidationGroup="GrpObligatorio" MaxLength="3"></asp:TextBox>
<asp:Label AssociatedControlID="TxtFretardo" runat="server" Text="Tolerancia salida"></asp:Label>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtFsalida" FilterType="Numbers" />
</div>
<div class="form-group form-md-line-input input-iconright ocultar">
<asp:DropDownList ID="ddlDiaDescanso" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" Style="width: 100%">
<asp:ListItem Value="-1" Text="Sin Asignar" Selected="True"></asp:ListItem>
@@ -201,4 +239,63 @@
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script>
function validaRetardoEntrada(sender, args) {
let respuesta = false;
let StrToleranciaEntrada = $('#<%= TxtRetardo.ClientID %>').val()
let ToleranciaEntrada = isNaN(StrToleranciaEntrada) ? 0 : parseFloat(StrToleranciaEntrada);
let StrToleranciaEntradaRetardo = $('#<%= TxtFretardo.ClientID %>').val()
let ToleranciaEntradaRetardo = isNaN(StrToleranciaEntradaRetardo) ? 0 : parseFloat(StrToleranciaEntradaRetardo);
if (ToleranciaEntradaRetardo > 0) {
if (ToleranciaEntradaRetardo > ToleranciaEntrada) {
respuesta = true;
} else {
respuesta = false;
}
} else {
respuesta = true;
}
args.IsValid = respuesta;
}
function validaSalidaTemprano(sender, args) {
let respuesta = false;
let StrToleranciaSRetardo = $('#<%= TxtToleranciaSRetardo.ClientID %>').val()
let ToleranciaSRetardo = isNaN(StrToleranciaSRetardo) ? 0 : parseFloat(StrToleranciaSRetardo);
let StrFsalida = $('#<%= TxtFsalida.ClientID %>').val()
let Fsalida = isNaN(StrFsalida) ? 0 : parseFloat(StrFsalida);
if (ToleranciaSRetardo > 0) {
if (ToleranciaSRetardo < Fsalida) {
respuesta = true;
} else {
respuesta = false;
}
} else {
respuesta = true;
}
args.IsValid = respuesta;
}
</script>
</asp:Content>

View File

@@ -12,6 +12,11 @@ Partial Class RH_CatTurno
If Not Page.IsPostBack Then
CargaDdlChecadorHorario()
CargaDatos()
If UsuarioActual.CveEmpresa <> 158 Then
DvToleranciaSRetardo.Visible = True
End If
End If
End Sub
@@ -39,17 +44,22 @@ Partial Class RH_CatTurno
Using ObjRH As New ClsRH
Dim Estatus As Boolean = False
Dim comida As Integer = If(chkComida.Checked, 1, 0)
Dim ComidaDe As String = If(TxtComidade.Text.Trim = "", "00:00:00", TxtComidade.Text.Trim)
Dim ComidaA As String = If(TxtComidaA.Text.Trim = "", "00:00:00", TxtComidaA.Text.Trim)
If ChkEstatus.Checked Then Estatus = True
If HdnModalidad.Value = "A" Then
If ObjRH.AddTurno(TxtTurno.Text, TxtHorarioDe.Text, TxtHorarioA.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlChecadorHorario.SelectedValue.ToEntero(),
TxtRetardo.Text.ToEntero(), TxtFretardo.Text.ToEntero() - TxtRetardo.Text.ToEntero(), 0, TxtFsalida.Text.ToEntero(), comida, TxtComidade.Text, TxtComidaA.Text, ddlDiaDescanso.SelectedValue.ToEntero()) Then
TxtRetardo.Text.ToEntero(), TxtFretardo.Text.ToEntero() - TxtRetardo.Text.ToEntero(), TxtToleranciaSRetardo.Text.ToEntero(), TxtFsalida.Text.ToEntero(), comida, ComidaDe, ComidaA, ddlDiaDescanso.SelectedValue.ToEntero()) Then
CargaDatos()
CargaGlobalDTTurno()
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
End If
ElseIf HdnModalidad.Value = "U" Then
If ObjRH.UpdateTurno(TxtTurno.Text, TxtHorarioDe.Text, TxtHorarioA.Text, Estatus, HdnID.Value.ToEntero(), UsuarioActual.CveUsuario, DdlChecadorHorario.SelectedValue.ToEntero(),
TxtRetardo.Text.ToEntero(), TxtFretardo.Text.ToEntero() - TxtRetardo.Text.ToEntero(), 0, TxtFsalida.Text.ToEntero(), comida, TxtComidade.Text, TxtComidaA.Text, ddlDiaDescanso.SelectedValue.ToEntero()) Then
TxtRetardo.Text.ToEntero(), TxtFretardo.Text.ToEntero() - TxtRetardo.Text.ToEntero(), TxtToleranciaSRetardo.Text.ToEntero(), TxtFsalida.Text.ToEntero(), comida, ComidaDe, ComidaA, ddlDiaDescanso.SelectedValue.ToEntero()) Then
CargaDatos()
CargaGlobalDTTurno()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
@@ -80,8 +90,11 @@ Partial Class RH_CatTurno
chkComida.Checked = (GvRow.DataKey("Comida") = "1")
TxtComidade.Text = GvRow.DataKey("ComidaDe")
TxtComidaA.Text = GvRow.DataKey("ComidaA")
TxtToleranciaSRetardo.Text = GvRow.DataKey("ToleranciaSRetardo")
ddlDiaDescanso.SelectedValueExist(GvRow.DataKey("DiaDescanso"))
chkComida_CheckedChanged(Nothing, Nothing)
UpAddTurno.Update()
'CargaGlobalDTTurno()
@@ -103,6 +116,7 @@ Partial Class RH_CatTurno
ddlDiaDescanso.SelectedValueExist("-1")
CargaDdlChecadorHorario()
ChkEstatus.Checked = True
DVHorarioComida.Visible = True
UpAddTurno.Update()
@@ -154,4 +168,14 @@ Partial Class RH_CatTurno
End If
End If
End Sub
Protected Sub chkComida_CheckedChanged(sender As Object, e As EventArgs)
If chkComida.Checked Then
DVHorarioComida.Visible = True
Else
DVHorarioComida.Visible = False
End If
UpAddTurno.Update()
End Sub
End Class

View File

@@ -1099,7 +1099,7 @@ function ADDropzone(txtid) {
var urldown = txt.data('urldown'); if ((urldown) && (urldown != "")) { } else { urldown = domain + "/Ashx/SIGWeb.ashx"; }
var urlget = txt.data('urlget'); if ((urlget) && (urlget != "")) { } else { urlget = domain + "/temp/"; }
var maxFilesize = txt.data('maxfilesize'); if (maxFilesize) { } else { maxFilesize = 10; }
var maxFilesize = txt.data('maxfilesize'); if (maxFilesize) { } else { maxFilesize = 20; }
var maxFile = txt.attr('data-maxFile'); if (maxFile) { } else { maxFile = null; }
var mydiv = $("<div id='" + txtid + "-drop' class='addropzone'></div>");
var mypaste = $("<div id='" + txtid + "-paste' contenteditable='true' class='mypaste'></div>")

View File

@@ -351,7 +351,7 @@
<!-- add "navbar-no-scroll" class to disable the scrolling of the sidebar menu -->
<!-- BEGIN SIDEBAR MENU -->
<ul class="page-sidebar-menu" id='ulmenulateralmaster' data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200">
<li class="sidebar-toggler-wrapper">
<li class="sidebar-toggler-wrapper" id="LiSideBar" runat="server">
<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
<div class="sidebar-toggler">
</div>

View File

@@ -153,6 +153,12 @@ Partial Class Site
End If
End If
If UsuarioActual.CvePlataforma.Contiene(6, 7) Then
LiSideBar.Visible = False
End If
Else
'VALIDACION DE SEGURIDAD, EN LA QUE SE VALIDA QUE LA EMPRESA EN LA QUE SE GENERO LA PAGINA SEA LA MISMA A LA DE LA SESION,
'DE NO SER ASI, SE REDIRECCIONA A INICIO.

View File

@@ -6,7 +6,7 @@
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="ImgAddPromocion" PostBackUrl="/Ventas/Promociones.aspx" CommandArgument="-1" runat="server"><i class="fa fa-plus-circle"></i> Registrar Nueva Promoción</asp:LinkButton>
<asp:LinkButton ID="ImgAddPromocion" PostBackUrl="/Ventas/Promociones.aspx" CommandArgument="-1" runat="server"><i class="fa fa-plus-circle"></i>Nueva Promoción</asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
@@ -57,7 +57,7 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None">
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover" runat="server" AutoGenerateColumns="False" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Promoción" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>

View File

@@ -806,11 +806,9 @@ Partial Class Clientes
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
DivTipoRetenciones.Visible = True
DivRetIVA.Visible = False
End If
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
divRegimen.Visible = True
End If
End If
divRegimen.Visible = True
If UsuarioActual.CveEmpresa.Contiene(1) Or UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
DivRepresentanteLegal.Visible = True
@@ -2073,17 +2071,13 @@ Partial Class Clientes
End Sub
Private Sub CargaComboCFDI()
Dim RegimenFiscalCliente = DdlRegimenFiscal.SelectedValue.ToString()
If Not UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
RegimenFiscalCliente = "-1"
End If
'If Not UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
' RegimenFiscalCliente = "-1"
'End If
DdlUsoCFDI.Items.Clear()
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
Else
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
End If
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
DdlUsoCFDI.DataBind()
DdlUsoCFDI.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -2483,23 +2477,18 @@ Partial Class Clientes
End If
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscal.SelectedValue <> "11" Then
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDI.SelectedValue <> "23" Then
Alert("El uso del cfdi debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscal.SelectedValue <> "11" Then
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDI.SelectedValue <> "23" Then
Alert("El uso del cfdi debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'CargaSucursal()
@@ -10308,7 +10297,7 @@ Partial Class Clientes
DVRegimenSociedad.Visible = False
DivRazonSocial2.Attributes.Add("class", "col-md-12")
If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
If RdTipoPersona.SelectedValue.ToEntero = 1 Then
DivRazonSocial2.Attributes.Add("class", "col-md-8")
DVRegimenSociedad.Visible = True
Else

View File

@@ -541,17 +541,23 @@
<%--26--%>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtLiqColT" Width="55px" runat="server" Font-Bold="true" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox>
<asp:TextBox ID="TxtLiqCol10" Width="55px" runat="server" Style="text-align: right;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<%--27--%>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtLiqColT" Width="55px" runat="server" Font-Bold="true" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<%--28--%>
<asp:TemplateField Visible="false" HeaderText="Anticipo" ItemStyle-Width="120px">
<ItemTemplate>
<asp:TextBox ID="TxtAmort" Width="50px" runat="server" Style="text-align: right;"></asp:TextBox>
<asp:DropDownList ID="DdlAnti" runat="server" Width="40px" DataTextField="RazonSocial" DataValueField="CveIE"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<%--28--%>
<%--29--%>
<asp:TemplateField Visible="false" HeaderText="Anticipo2" ItemStyle-Width="120px">
<ItemTemplate>
<asp:TextBox ID="TxtAmort2" Width="50px" runat="server" Style="text-align: right;"></asp:TextBox>
@@ -559,7 +565,7 @@
</ItemTemplate>
</asp:TemplateField>
<%--29--%>
<%--30--%>
<asp:TemplateField>
<HeaderTemplate>Auxiliar</HeaderTemplate>
<ItemTemplate>
@@ -567,7 +573,7 @@
</ItemTemplate>
</asp:TemplateField>
<%--30--%>
<%--31--%>
<asp:TemplateField>
<HeaderTemplate>
Comp<br>

View File

@@ -408,7 +408,8 @@ Partial Class Ventas_ClientesAbonar
GvCxC.Columns(23).HeaderText = "Aduana<br/>USA" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
GvCxC.Columns(24).HeaderText = "Material<br/>Empaque" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
GvCxC.Columns(25).HeaderText = "Semilla" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
GvCxC.Columns(26).HeaderText = "Total<br/>Gastos"
GvCxC.Columns(26).HeaderText = "Fletes" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
GvCxC.Columns(27).HeaderText = "Total<br/>Gastos"
DvLiquidacion1.Visible = True
DvLiquidacion2.Visible = True
@@ -565,6 +566,7 @@ Partial Class Ventas_ClientesAbonar
e.Row.FCTextBox("TxtLiqCol7").Visible = False
e.Row.FCTextBox("TxtLiqCol8").Visible = False
e.Row.FCTextBox("TxtLiqCol9").Visible = False
e.Row.FCTextBox("TxtLiqCol10").Visible = False
e.Row.FCTextBox("TxtLiqColT").Visible = False
e.Row.FCTextBox("TxtAmort").Visible = False
e.Row.FCTextBox("TxtAmort2").Visible = False
@@ -655,6 +657,7 @@ Partial Class Ventas_ClientesAbonar
e.Row.FCTextBox("TxtLiqCol7").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}")
e.Row.FCTextBox("TxtLiqCol8").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}")
e.Row.FCTextBox("TxtLiqCol9").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}")
e.Row.FCTextBox("TxtLiqCol10").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}")
e.Row.FCTextBox("TxtLiqColT").Attributes.Add("class", $"ClsSelLiqVentaTotal{e.Row.DBCampo("CveVenta")}")
e.Row.FCTextBox("TxtAmort").Attributes.Add("class", $"ClsSelLiqAnt")
@@ -669,6 +672,7 @@ Partial Class Ventas_ClientesAbonar
e.Row.FCTextBox("TxtLiqCol7").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiqCol8").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiqCol9").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiqCol10").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtAmort").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtAmort2").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
@@ -1010,7 +1014,7 @@ Partial Class Ventas_ClientesAbonar
End If
tipoCambioPago = Pago.TCPago
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal * Pago.TCPago
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal * If(Pago.CveMonedaPago = VentaActual.CveMoneda, 1, Pago.TCPago)
'If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then
' EsAnticipoEspecial = True
@@ -1038,6 +1042,7 @@ Partial Class Ventas_ClientesAbonar
Dim ImporteLiq7 As Decimal = gvr.FCTextBox("TxtLiqCol7").Text.ToDecimal
Dim ImporteLiq8 As Decimal = gvr.FCTextBox("TxtLiqCol8").Text.ToDecimal
Dim ImporteLiq9 As Decimal = gvr.FCTextBox("TxtLiqCol9").Text.ToDecimal
Dim ImporteLiq10 As Decimal = gvr.FCTextBox("TxtLiqCol10").Text.ToDecimal
Dim CveClasificacionCol1 As Integer = 21514 'comisiones sobre venta
Dim CveClasificacionCol2 As Integer = 21916 ' manejo
@@ -1048,6 +1053,7 @@ Partial Class Ventas_ClientesAbonar
Dim CveClasificacionCol7 As Integer = 21919 'gastos aduanales usa
Dim CveClasificacionCol8 As Integer = 21211 'material Empaque
Dim CveClasificacionCol9 As Integer = 21207 'Semilla
Dim CveClasificacionCol10 As Integer = 21541 'Flete
Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero
Dim CveConceptoLiquidacion As Integer = 51
@@ -1107,6 +1113,12 @@ Partial Class Ventas_ClientesAbonar
End If
End If
If ImporteLiq10 <> 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq10, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq10 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol10, ImporteME:=If(CveMoneda > 1, ImporteLiq10, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" : Exit For
End If
End If
If MsgError = "" AndAlso gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero > 0 Then
Dim TCP As Decimal = 0
Dim FolioPago As String = " "
@@ -1498,11 +1510,7 @@ Partial Class Ventas_ClientesAbonar
ObjFacturaDevolucion.TipoDocto = "Egs"
ObjFacturaDevolucion.Fecha = Now
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
ObjFacturaDevolucion.Version = "4.0"
Else
ObjFacturaDevolucion.Version = "3.3"
End If
ObjFacturaDevolucion.Version = "4.0"
ObjFacturaDevolucion.CveMetodoPago33 = 1
ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición"
@@ -1672,11 +1680,7 @@ Partial Class Ventas_ClientesAbonar
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
Else
Timbre.Receptor.RFC = Obj.Cliente.RFC
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
Else
Timbre.Receptor.Nombre = Obj.Cliente.Nombre + " " + Obj.Cliente.RegimenSociedad
End If
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
End If
@@ -2907,6 +2911,7 @@ Partial Class Ventas_ClientesAbonar
GvRow.FCTextBox("TxtLiqCol7").Text = Drow("AduanaUSA").ToString
GvRow.FCTextBox("TxtLiqCol8").Text = Drow("MaterialEmpaque").ToString
GvRow.FCTextBox("TxtLiqCol9").Text = Drow("Semilla").ToString
GvRow.FCTextBox("TxtLiqCol10").Text = Drow("Fletes").ToString
GvRow.FCDropDownList("DdlAnti").SelectedTextLikeIfExist(Drow("FolioAnticipo1").ToString)
GvRow.FCTextBox("TxtAmort").Text = Drow("ImporteAnticipo1").ToString

View File

@@ -2466,9 +2466,6 @@ Partial Class PV
'End If
End Sub
Private Sub CargaUsoCFDI()
If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
ClienteCodigoRegimenFiscal = "-1"
End If
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=ClienteCodigoRegimenFiscal)
DdlUsoCFDI.DataBind()
End Sub
@@ -2730,7 +2727,7 @@ Partial Class PV
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
'S01 Sin efectos fiscales.
DdlUsoCFDI.SelectedValueExist("23")
DdlUsoCFDI.Enabled = False
@@ -2915,7 +2912,7 @@ Partial Class PV
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
'S01 Sin efectos fiscales.
DdlUsoCFDI.SelectedValueExist("23")
DdlUsoCFDI.Enabled = False
@@ -2951,7 +2948,7 @@ Partial Class PV
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33)
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
'S01 Sin efectos fiscales.
DdlUsoCFDI.SelectedValueExist("23")
DdlUsoCFDI.Enabled = False
@@ -6499,7 +6496,7 @@ Partial Class PV
RFVCiudadC.Visible = False
RFVLocalidadC.Visible = False
RFVSATPais.Visible = False
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1"
divRegimenCliente.Visible = True
RdTipoPersona.SelectedValue = "0"
@@ -6542,7 +6539,7 @@ Partial Class PV
DivCorreoCuentaCliente.Visible = True
DivBotonesAgregarCliente.Visible = True
DivFormaCliente.Visible = True
divRegimenCliente.Visible = UsuarioActual.Empresa.Funcionalidad(350) = "1"
divRegimenCliente.Visible = True
End If
End If
ObjCliente.Dispose()
@@ -6580,17 +6577,13 @@ Partial Class PV
Else
Dim RegimenFiscalCliente As String = "-1"
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {DdlRegimenFiscalCliente.SelectedValue.ToEntero()}")
End If
DdlUsoCFDICliente.Items.Clear()
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
Else
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
End If
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
DdlUsoCFDICliente.DataSource = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente)
DdlUsoCFDICliente.DataBind()
DdlUsoCFDICliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -6612,46 +6605,44 @@ Partial Class PV
Dim CveRegimenFiscal As Integer = -1
Dim CveUsoCFDI As Integer = 3
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
CveRegimenFiscal = DdlRegimenFiscalCliente.SelectedValue.ToEntero()
CveUsoCFDI = DdlUsoCFDICliente.SelectedValue.ToEntero()
CveRegimenFiscal = DdlRegimenFiscalCliente.SelectedValue.ToEntero()
CveUsoCFDI = DdlUsoCFDICliente.SelectedValue.ToEntero()
Dim RegimenFiscalCliente As String = "-1"
If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {CveRegimenFiscal}")
End If
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue <> "11" Then
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue <> "23" Then
Alert("El uso cfdi del cliente debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue = "11" Then
Alert("El Regimen fiscal del cliente no puede ser <b>'616 - Sin obligaciones fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue = "23" Then
Alert("El uso cfdi del cliente no puede ser <b>'S01 - Sin efectos fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")
If DtUsosCFDI.Rows.Count = 0 Then
Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim RegimenFiscalCliente As String = "-1"
If DdlRegimenFiscalCliente.SelectedValue.ToEntero() > 0 Then
RegimenFiscalCliente = GlobalDTRegimenesFiscales().FiltroPrimeroValor("CodigoRegimenFiscal", $"CveRegimenFiscal = {CveRegimenFiscal}")
End If
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue <> "11" Then
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue <> "23" Then
Alert("El uso cfdi del cliente debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscalCliente.SelectedValue = "11" Then
Alert("El Regimen fiscal del cliente no puede ser <b>'616 - Sin obligaciones fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not TxtRFCCliente.Text.Trim().ToUpper().Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDICliente.SelectedValue = "23" Then
Alert("El uso cfdi del cliente no puede ser <b>'S01 - Sin efectos fiscales'</b> si no se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")
If DtUsosCFDI.Rows.Count = 0 Then
Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa).Rows(0)
If Dr IsNot Nothing Then
@@ -7378,7 +7369,7 @@ Partial Class PV
End If
DdlTipoUso.Items.Clear()
DdlTipoUso.DataSource = GlobalDTAcumGarantiasMesesTipoUso(UsuarioActual.CveEmpresa, CveMarca)
DdlTipoUso.DataSource = GlobalDTAcumGarantiasTipoUso(UsuarioActual.CveEmpresa, CveMarca, -1)
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlTipoUso.DataBind()
@@ -7434,12 +7425,13 @@ Partial Class PV
CveMarca = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero
Dim ImportePagarCliente As Decimal = 0
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
If ObjAcum.DtResultados.Rows.Count > 0 Then
Dim dtt As DataTable = GlobalDTAcumGarantiasTipoUsoMeses(UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero)
If dtt IsNot Nothing Then
If dtt.Rows.Count > 0 Then
''obtener siempre y cuando la fecha de inicio sea mayor
Dim strDate As Date = ($"20{TxtEtiqueta.Text.Substring(2, 2)}/{TxtEtiqueta.Text.Substring(0, 2)}/01").ToDate
Dim drg As DataRow = ObjAcum.DtResultados.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# >= FechaInicioVigencia ", "FechaInicioVigencia DESC")
Dim drg As DataRow = dtt.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# >= FechaInicioVigencia ", "FechaInicioVigencia DESC")
If drg IsNot Nothing Then
TxtPorcentajeAjuste.Text = (drg("Valor").ToString.ToDouble / 100).ToString
@@ -7498,7 +7490,7 @@ Partial Class PV
Else
Alert("No se tiene especificado tabla de garantía")
End If
ObjAcum.Dispose()
Else
If DdlPSAjuste.SelectedValue.ToEntero <= 0 Then
Alert("Especificar el producto a recibir")

View File

@@ -28,7 +28,7 @@
<asp:UpdatePanel ID="UpGenerales" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<div class="col-md-6">
<div class="portlet light bordered">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
@@ -46,7 +46,7 @@
<div class="row">
<label class="col-md-2 truncate">Promoción:</label>
<div class="col-md-10">
<asp:TextBox ID="TxtPromocion" Width="90%" runat="server" />
<asp:TextBox ID="TxtPromocion" Width="90%" runat="server" class="input-group input-sm" />
<div>
<asp:RequiredFieldValidator ID="RfvTxtPromocion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtPromocion" Display="Dynamic"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Promoción''</b> es necesario, por favor ingréselo."
@@ -99,15 +99,14 @@
<%-- <asp:DropDownList ID="DdlSucursal" DataTextField="Sucursal" DataValueField="CveSucursal" CssClass="select2me" runat="server" Width="350px"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSucursal" runat="server" ControlToValidate="DdlSucursal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sucursal''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCESucursal" runat="server" HighlightCssClass="vco" TargetControlID="RFVSucursal" Width="300px"></ajax:ValidatorCalloutExtender>--%>
<asp:DropDownList ID="DdlSubProyecto" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="select2me" runat="server" Width="350px"></asp:DropDownList>
<asp:DropDownList ID="DdlSubProyecto" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="select2me" runat="server" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sucursal''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCESubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row">
<label class="col-md-2 truncate">Vendedor:</label>
<div class="col-md-4">
<asp:DropDownList ID="DdlVendedor" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="select2me" runat="server" Width="350px"></asp:DropDownList>
<asp:DropDownList ID="DdlVendedor" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="select2me" runat="server" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVVendedor" runat="server" ControlToValidate="DdlVendedor" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Vendedor''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEVendedor" runat="server" HighlightCssClass="vco" TargetControlID="RFVVendedor" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
@@ -115,42 +114,31 @@
<div class="row">
<label class="col-md-2 truncate">Cliente:</label>
<div class="col-md-4">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width:350px;">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width:100%;">
</ADS:Dropdownlost>
</div>
</div>
<div class="row">
<label class="col-md-2 truncate">Moneda:</label>
<div class="col-md-4">
<asp:DropDownList ID="DdlMoneda" DataTextField="Moneda" DataValueField="CveMoneda" CssClass="select2me" runat="server" Width="350px"></asp:DropDownList>
<asp:DropDownList ID="DdlMoneda" DataTextField="Moneda" DataValueField="CveMoneda" CssClass="select2me" runat="server" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco" TargetControlID="RFVMoneda" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row">
<label class="col-md-2 truncate">Estatus:</label>
<div class="col-md-4">
<asp:CheckBox ID="ChkEstatus" runat="server" />
</div>
</div>
<div class="row">
<label class="col-md-2 truncate">Tipo Aplicacion:</label>
<div class="col-md-4">
<asp:DropDownList ID="DdlTipoAplicacion" DataTextField="Moneda" DataValueField="CveMoneda" CssClass="select2me" runat="server" Width="350px">
<asp:ListItem Value ="-1">Seleccione</asp:ListItem>
<asp:DropDownList ID="DdlTipoAplicacion" DataTextField="Moneda" DataValueField="CveMoneda" CssClass="select2me" runat="server" Width="100%">
<asp:ListItem Value ="-1">-</asp:ListItem>
<asp:ListItem Value ="1">Descuento</asp:ListItem>
<asp:ListItem Value ="2">PU</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-2 truncate">Marca:</label>
<div class="col-md-4">
<asp:DropDownList ID="DdlMarca" DataTextField="Marca" DataValueField="CveMarca" CssClass="select2me" runat="server" Width="350px"></asp:DropDownList>
<asp:DropDownList ID="DdlMarca" DataTextField="Marca" DataValueField="CveMarca" CssClass="select2me" runat="server" Width="100%"></asp:DropDownList>
</div>
</div>
<div class="row" id="divDistribuidor" runat="server" visible="false">
@@ -163,6 +151,14 @@
</asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-2 truncate">Estatus:</label>
<div class="col-md-4">
<asp:CheckBox ID="ChkEstatus" runat="server" />
</div>
</div>
</div>
</div>
</div>
@@ -177,7 +173,7 @@
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<div class="col-md-12">
<div class="portlet light bordered">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
@@ -361,9 +357,13 @@
<div class="row">
<label class="col-md-3 truncate">Condiciones:</label>
<div class="col-md-9">
<div class="col-md-3">
<asp:CheckBox ID="ChkRestricciones" OnCheckedChanged="ChkRestricciones_CheckedChanged" AutoPostBack="true" CssClass="md-check" Text="" runat="server" />
</div>
<label class="col-md-3 truncate">Incluye Impuestos:</label>
<div class="col-md-3">
<asp:CheckBox ID="ChkIncluyeImpuesto" AutoPostBack="false" CssClass="md-check" Text="" runat="server" />
</div>
</div>
<div id="DivRestricciones" runat="server" visible="false">
@@ -427,12 +427,7 @@
</div>
</div>
</div>
<div class="row">
<label class="col-md-3 truncate">Incluye Impuestos:</label>
<div class="col-md-9">
<asp:CheckBox ID="ChkIncluyeImpuesto" AutoPostBack="false" CssClass="md-check" Text="" runat="server" />
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn btn-">Cerrar</button>

View File

@@ -3385,9 +3385,9 @@ Partial Class Ventas
InicializaAplicarNC()
If CveCliente > 0 Then
CargaRestriccionesCreditoCliente(CveVenta:=Me.CveVenta)
End If
'If CveCliente > 0 Then
' CargaRestriccionesCreditoCliente(CveVenta:=Me.CveVenta)
'End If
If Not CveVenta > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(403).ToString() = "1" Then
If (DdlTipoComprobante.Items.FindByValue("Ing") IsNot Nothing) Then
@@ -6652,10 +6652,6 @@ Partial Class Ventas
ChkEmitirComercioExterior.Checked = True
ChkEmitirComercioExterior_CheckedChanged(ChkEmitirComercioExterior, EventArgs.Empty)
End If
If ObjCliente.AplicaComercioExterior Then
'DdlSATMotivoTraslado.DataSource = GlobalDTSATMotivoTraslado
'DdlSATMotivoTraslado.DataBind()
'DdlSATMotivoTraslado.SelectedValueExist(ObjCliente.CveMotivoTraslado)
@@ -6873,10 +6869,6 @@ Partial Class Ventas
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
If Not (ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem") Then
CargaRestriccionesCreditoCliente(True, Me.CveVenta)
End If
' si es empresa acumuladores
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
CargaPorcentajeMarcas()
@@ -6905,7 +6897,7 @@ Partial Class Ventas
If CveCliente > 0 Then CargaAnticipos(CveCliente) : UpAnticipos.Update()
If CveCliente > 0 AndAlso UsuarioActual.CveEmpresa = 140 AndAlso CveVenta <= 0 Then
If CveCliente > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveVenta <= 0 Then
DivVentasUsados.Visible = True
Dim ObjClientes As New ClsClientes
@@ -6947,12 +6939,18 @@ Partial Class Ventas
UpModalButtonUploadDocumentoCliente.Update()
UPObservaciones.Update()
' RegistraScript("$('#DivDocsClienteUpload').modal({ backdrop: 'static', keyboard: false});", "modalOC")
End If
BloqueaCondiconesPago()
DeshabilitarAplicarNotaDeCredito(LblRFC.Text)
Dim CveVentaRef As Integer = -1
If Me.CveVenta > 0 AndAlso Not EsCreaApartirDe Then
CveVentaRef = Me.CveVenta
End If
CargaRestriccionesCreditoCliente(True, CveVentaRef)
If CveVenta <= 0 Then
CalculaLineasAdicionales()
HabilitaRemisionPublicoGeneral = 0
@@ -7570,8 +7568,6 @@ Partial Class Ventas
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
End If
End If
HabilitarRemisionesPublicoGeneral()
End If
'CUANDO SEA COTIZACION Y SEA COMPUPROVEEDORES (EMPRESA 72) NO DEBE ENVIAR CORREO AL CLIENTE
@@ -7616,9 +7612,7 @@ Partial Class Ventas
LblEstado.Text = ObjCliente.DtResultados.Rows(0)("Estado").ToString()
'TxtNumCtaPago.Text = ObjCliente.DtResultados.Rows(0)("NumCtaPago").ToString()
LblTelefono.Text = ObjCliente.DtResultados.Rows(0)("Telefono").ToString()
'If Not UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
' LblCP.Text = ObjCliente.DtResultados.Rows(0)("CP").ToString()
'End If
ViewState("CliLocalidad") = ObjCliente.DtResultados.Rows(0)("Localidad").ToString()
ViewState("CliPais") = ObjCliente.DtResultados.Rows(0)("Pais").ToString()
ViewState("CliNoExt") = ObjCliente.DtResultados.Rows(0)("NoExt").ToString()
@@ -9582,39 +9576,6 @@ Partial Class Ventas
Exit Sub
End If
'Verifica versión 3.3.()
'If (Not UsuarioActual.Empresa.Funcionalidad(350) = "1") AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then
' Dim dttsat As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '' OR ISNULL(SATClaveUM,'') = '' ")
' If dttsat IsNot Nothing AndAlso dttsat.Rows.Count > 0 Then
' Dim str As New StringBuilder
' str.Append("Los siguientes productos no tiene asignado la clave Producto SAT o Unidad Medida SAT<br/><br/>")
' For Each drt As DataRow In dttsat.Rows
' str.AppendFormat("{0} <br/>", drt("CodigoPS"))
' Next
' Alert(str.ToString(), TipoMensaje.MsgAdvertencia)
' dttsat.Dispose()
' str.Clear()
' Exit Sub
' End If
' dttsat.Dispose()
' If UsuarioActual.CveEmpresa = 72 Then
' Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(SATClaveProdServ,'') = '01010101' ")
' If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then
' Dim StrNoEncontrados As New StringBuilder
' StrNoEncontrados.Append("Los siguientes productos no existen en el catálogo del SAT<br/><br/>")
' For Each drt As DataRow In DtNoEncontrados.Rows
' StrNoEncontrados.AppendFormat("{0} <br/>", drt("CodigoPS"))
' Next
' Alert(StrNoEncontrados.ToString(), TipoMensaje.MsgAdvertencia)
' DtNoEncontrados.Dispose()
' StrNoEncontrados.Clear()
' Exit Sub
' End If
' DtNoEncontrados.Dispose()
' End If
'End If
'CREA UNA COPIA DE SEGURIDAD PARA LOS DATOS DEL TMPDT
If TmpDTError Is Nothing OrElse TmpDTError.Rows.Count = 0 Then
TmpDTError = TmpDT.Copy()
@@ -18047,7 +18008,12 @@ Partial Class Ventas
End Sub
Protected Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged
CargaClienteSucursal(DdlSucursalCliente.SelectedValue.ToEntero())
CargaRestriccionesCreditoCliente(Alertas:=True, CveVenta:=Me.CveVenta)
'RECARGA LAS RESTRICCIONES DE CREDITO SI SE CAMBIO LA SUCURSAL DEL CLIENTE
If DdlSucursalCliente.SelectedValue.ToEntero() > 0 Then
CargaRestriccionesCreditoCliente(Alertas:=True, CveVenta:=Me.CveVenta)
End If
End Sub
Protected Sub DdlCCEdit_SelectedIndexChanged(sender As Object, e As System.EventArgs)
Dim gvr As GridViewRow = DirectCast(DirectCast(sender, DropDownList).BindingContainer, GridViewRow)
@@ -33137,7 +33103,7 @@ Partial Class Ventas
CambiaTipoDocto()
CambiaSucursalGeneral(RecargarPartidas:=False)
CargaAnticipos(CveCliente)
CargaRestriccionesCreditoCliente(CveVenta:=-1)
CargaRestriccionesCreditoCliente(True, CveVenta:=-1)
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
TabAlmacen.Visible = True