Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -3,11 +3,8 @@ Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports AjaxControlToolkit
|
||||
Imports Extensiones
|
||||
Imports iText.StyledXmlParser.Css.Resolve.Shorthand.Impl
|
||||
Imports Modelos
|
||||
Imports Stimulsoft.Report.Func
|
||||
|
||||
|
||||
Public Class ClsClientes
|
||||
Implements IDisposable
|
||||
@@ -980,13 +977,13 @@ Public Class ClsClientes
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetSucursales(CveCliente As Integer, Optional CveClienteSucursal As Integer = -1) As Boolean
|
||||
Public Function GetSucursales(CveCliente As Integer, Optional CveClienteSucursal As Integer = -1, Optional CveEmpresa As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_SucursalClienteGet")
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
@@ -2159,7 +2156,7 @@ Public Class ClsClientes
|
||||
#End Region
|
||||
|
||||
#Region "A P L I C A C I O N"
|
||||
Public Function AddClienteApp(Cliente As MCliente) As Boolean
|
||||
Public Function AddClienteApp(Cliente As Modelos.MCliente) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_ClientesAppAdd")
|
||||
|
||||
@@ -2251,7 +2251,7 @@ Public Class ClsPaginas
|
||||
Dim AppNombre As String = $"GlobalDTClientesSucursales-{CveEmpresa}"
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim ObjClientes As New ClsClientes
|
||||
If ObjClientes.GetClienteSucursales(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados.Copy()
|
||||
If ObjClientes.GetSucursales(-1, -1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClientes.DtResultados.Copy()
|
||||
ObjClientes.Dispose()
|
||||
End If
|
||||
Dim filtros As New List(Of String)
|
||||
@@ -9451,7 +9451,6 @@ Public Class ClsPaginas
|
||||
End If
|
||||
If Pago.TipoPago = "A" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' A N T I C I P O
|
||||
Concepto = String.Format("{0} Ant:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
||||
Dim Ret As New ConceptosRetenciones
|
||||
'Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 1)
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
@@ -9465,7 +9464,6 @@ Public Class ClsPaginas
|
||||
End If
|
||||
If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' N O T A D E C R E D I T O
|
||||
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
||||
Dim Ret As New ConceptosRetenciones
|
||||
Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, Pago.CveMonedaPago, True, 2)
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
@@ -9479,7 +9477,6 @@ Public Class ClsPaginas
|
||||
End If
|
||||
If Pago.TipoPago = "I" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' I N G R E S O S X C O M P R O B A R
|
||||
Concepto = String.Format("{0} IxC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
||||
Dim Ret As New ConceptosRetenciones
|
||||
If VentaActual.UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
'If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||
If VentaActual.UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
@@ -9501,6 +9498,14 @@ Public Class ClsPaginas
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=Pago.CveClientePago, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Pago.TipoPago = "FyE" AndAlso Not ErrorMovtos Then ' F U N C I O N A R I O S Y E M P L E A D O S
|
||||
Concepto = String.Format("{0} - {1}", VentaActual.ClienteNombre, Pago.Referencia)
|
||||
|
||||
'Agregamos Nacional
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 29, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=Pago.CveClientePago, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
|
||||
End If
|
||||
'si tiene otros gastos/ingresos
|
||||
|
||||
If Not ErrorMovtos AndAlso Pago.OtroGastoIngreso <> 0 Then
|
||||
|
||||
@@ -3445,6 +3445,28 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetCortesDetalleVentasResumenIVA(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_CortesDetalleVentasResumenIVAGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CANCELAR ANTE SAT "
|
||||
|
||||
@@ -341,15 +341,27 @@
|
||||
<asp:UpdatePanel runat="server" ID="UPPDetalle" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div runat="server" id="divDetalle" visible="false">
|
||||
<br />
|
||||
<br />
|
||||
<b>Detalles del Corte</b>
|
||||
<asp:GridView ID="GvP" runat="server" AutoGenerateColumns="False" GridLines="None" Caption="Resumen" CssClass="table table-striped table-advance table-hover ScrollAD">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Método Pago" DataField="MetodoPago" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<br />
|
||||
<b>Detalles del Corte</b>
|
||||
<asp:GridView ID="GvP" runat="server" AutoGenerateColumns="False" GridLines="None" CssClass="table table-striped table-advance table-hover">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Método Pago" DataField="MetodoPago" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:GridView ID="GvPorIVA" runat="server" AutoGenerateColumns="False" GridLines="None" CssClass="table table-striped table-advance table-hover">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Documento" DataField="TipoDocto" />
|
||||
<asp:BoundField HeaderText="16%" DataField="IVA16" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText=" 0%" DataField="IVA0" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun corte" DataKeyNames="CveVenta" ToolTip="Reporte de Cortes" CssClass="table table-striped table-advance table-hover Widthall" Style="position: static" UseAccessibleHeader="false" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
|
||||
@@ -174,6 +174,10 @@ Partial Class Bancos_RepCortes
|
||||
GvP.DataSource = Vn.DtResultados
|
||||
DtCortesVentasResumen = Vn.DtResultados
|
||||
End If
|
||||
If Vn.GetCortesDetalleVentasResumenIVA(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvPorIVA.DataSource = Vn.DtResultados
|
||||
End If
|
||||
|
||||
If Vent.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
|
||||
GvD.DataSource = Vent.DtResultados
|
||||
DtCortesVentas = Vent.DtResultados
|
||||
@@ -192,6 +196,7 @@ Partial Class Bancos_RepCortes
|
||||
Vent.Dispose()
|
||||
GvD.DataBind()
|
||||
GvP.DataBind()
|
||||
GvPorIVA.DataBind()
|
||||
UPPDetalle.Update()
|
||||
UpAcciones.Update()
|
||||
End Sub
|
||||
|
||||
@@ -7606,7 +7606,7 @@ Partial Class Compras_Compras
|
||||
If Not ErrorPrepoliza AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=4, AutoConta:=AutoConta) Then
|
||||
TieneError = True
|
||||
'If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
' GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
' Alert($"{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia}", TipoMensaje.MsgError)
|
||||
' ErrorPrepolizaDescuadre = True
|
||||
'End If
|
||||
End If
|
||||
@@ -14492,7 +14492,7 @@ Partial Class Compras_Compras
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnVincularOC_Click(sender As Object, e As EventArgs)
|
||||
VincularOcProntoPago = False
|
||||
'VincularOcProntoPago = False
|
||||
AjusteProntoPagoPorcentajeIVA = 0D
|
||||
AjusteProntoPagoConIVA = 0D
|
||||
AjusteProntoPagoSinIVA = 0D
|
||||
@@ -20849,6 +20849,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Public Function GeneraRemisionsNotadeCredito(ByRef trasaccion As SqlTransaction, CveCompraRegistrada As Integer) As Boolean
|
||||
Dim respuesta As Boolean = True
|
||||
Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
||||
|
||||
Dim CvePS_RNC As Integer = UsuarioActual.Empresa.Funcionalidad(580).ToEntero
|
||||
Dim PSRow As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS_RNC).FiltroPrimero("")
|
||||
@@ -20898,8 +20899,10 @@ Partial Class Compras_Compras
|
||||
Dim PS As String = PSRow("PS").ToString
|
||||
Dim CveUM As Integer = PSRow("CveUnidadMedida").ToString.ToEntero
|
||||
Dim UM As String = PSRow("UnidadMedida").ToString
|
||||
Dim IVARNC As Decimal = (ImporteRNC * PorcentajeIVA).RoundSQL(2)
|
||||
|
||||
CompraRNC.ConfiguraRegistroRapidoRNC(CvePS_RNC, CveUM, UM, CveClasificacion, Clasificacion, PS, CveSubProyectoPrincipal, SubProyecto, ImporteRNC, ImporteRNC)
|
||||
|
||||
CompraRNC.ConfiguraRegistroRapidoRNC(CvePS_RNC, CveUM, UM, CveClasificacion, Clasificacion, PS, CveSubProyectoPrincipal, SubProyecto, ImporteRNC, (ImporteRNC + IVARNC), IVARNC)
|
||||
If Not CompraRNC.AddCompraRNC(trasaccion) Then
|
||||
respuesta = False
|
||||
End If
|
||||
@@ -20920,8 +20923,9 @@ Partial Class Compras_Compras
|
||||
CompraRNCProntoPAgo.Serie = $"{TxtSerie.Text}_P"
|
||||
CompraRNCProntoPAgo.Folio = $"{TxtFolio.Text}_P"
|
||||
CompraRNCProntoPAgo.CveCompraAmortizacion = CveCompraRegistrada
|
||||
Dim IVARNCProntoPago As Decimal = (ImporteRNC * PorcentajeIVA).RoundSQL(2)
|
||||
|
||||
CompraRNCProntoPAgo.ConfiguraRegistroRapidoRNC(CvePS_RNC, CveUM, UM, CveClasificacion, Clasificacion, PS, CveSubProyectoPrincipal, SubProyecto, ImporteRNCProntoPago, ImporteRNCProntoPago)
|
||||
CompraRNCProntoPAgo.ConfiguraRegistroRapidoRNC(CvePS_RNC, CveUM, UM, CveClasificacion, Clasificacion, PS, CveSubProyectoPrincipal, SubProyecto, ImporteRNCProntoPago, (ImporteRNCProntoPago + IVARNCProntoPago), IVARNCProntoPago)
|
||||
If Not CompraRNCProntoPAgo.AddCompraRNC(trasaccion) Then
|
||||
respuesta = False
|
||||
End If
|
||||
@@ -20956,7 +20960,7 @@ Partial Class Compras_Compras
|
||||
Else
|
||||
|
||||
If ImporteRNCProntoPago > 0 Then
|
||||
LblModalConfirmaVinculacionProntoPago.Text = $"Existe una diferencia de ${(ImporteRNC + ImporteRNCProntoPago).ToString("###,###,###.00")} entre la compra y la Orden de Compra, se generararan dos Remisiones de Nota de Crédito una por descuento de ${ImporteRNC.ToString("###,###,###.00")} y otra por pronto pago de ${ImporteRNCProntoPago.ToString("###,###,###.00")}"
|
||||
LblModalConfirmaVinculacionProntoPago.Text = $"Existe una diferencia de ${(ImporteRNC + ImporteRNCProntoPago).ToString("###,###,###.00")} entre la compra y la Orden de Compra, se generaran dos Remisiones de Nota de Crédito una por descuento de ${ImporteRNC.ToString("###,###,###.00")} y otra por pronto pago de ${ImporteRNCProntoPago.ToString("###,###,###.00")}"
|
||||
Else
|
||||
LblModalConfirmaVinculacionProntoPago.Text = $"Existe una diferencia de ${(ImporteRNC).ToString("###,###,###.00")} entre la compra y la Orden de Compra, se generara una Remision de Nota de Crédito una por descuento de ${ImporteRNC.ToString("###,###,###.00")}"
|
||||
End If
|
||||
@@ -21630,7 +21634,7 @@ Public Class ClsCompraManagerCompras
|
||||
|
||||
End Function
|
||||
Public Function ConfiguraRegistroRapidoRNC(CvePS As Integer, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, PS As String, CveSubProyecto As Integer, SubProyecto As String,
|
||||
SubTotal As Decimal, Total As Decimal) As Boolean
|
||||
SubTotal As Decimal, Total As Decimal, IVA As Decimal) As Boolean
|
||||
|
||||
Dim respuesta As Boolean = True
|
||||
Me.CveSubProyecto = CveSubProyecto
|
||||
@@ -21642,6 +21646,7 @@ Public Class ClsCompraManagerCompras
|
||||
Me.CveTipoPoliza = 3
|
||||
Me.NumeroReembolso = ""
|
||||
Me.SubTotal = SubTotal
|
||||
Me.IVA = IVA
|
||||
Me.Total = Total
|
||||
|
||||
|
||||
|
||||
@@ -28,22 +28,22 @@ Partial Class Contabilidad_CatCuentas
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
'If Not UsuarioActual.CveEmpresa.Contiene(13, 83) AndAlso EsProduccion Then
|
||||
' Response.Redirect("/Contabilidad2/CatCuentas.aspx")
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
CargaMonedas()
|
||||
CargaAgrupadorSAT()
|
||||
CargaDatos()
|
||||
Else
|
||||
Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||
MEECuenta.Enabled = False
|
||||
LnkPdf.Visible = False
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||
Response.Redirect("/Contabilidad2/CatCuentas.aspx")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
CargaMonedas()
|
||||
CargaAgrupadorSAT()
|
||||
CargaDatos()
|
||||
Else
|
||||
Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||
MEECuenta.Enabled = False
|
||||
LnkPdf.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMonedas()
|
||||
|
||||
@@ -765,7 +765,6 @@ Partial Class RepCxCDetalle
|
||||
logouri = String.Format("file://{0}", Imagen.FullName)
|
||||
End If
|
||||
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
@@ -774,20 +773,24 @@ Partial Class RepCxCDetalle
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{ClasificacionCli}{CorteA}"))
|
||||
params.Add(New ReportParameter("TituloReporte", TituloReporte))
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
|
||||
Dim DSDatos As DataSet = CargaDatos()
|
||||
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DSDatos.Tables(0)}
|
||||
Dim dtt1 As DataTable = Nothing
|
||||
Dim dtt2 As DataTable = Nothing
|
||||
|
||||
If DSDatos IsNot Nothing AndAlso DSDatos.Tables.Count >= 1 Then
|
||||
dtt1 = DSDatos.Tables(0)
|
||||
If DSDatos.Tables.Count >= 2 Then dtt2 = DSDatos.Tables(1)
|
||||
End If
|
||||
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = dtt1}
|
||||
lrds.Add(rds)
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
Dim rdsCartera As New ReportDataSource With {.Name = "DSCartera", .Value = DSDatos.Tables(1)}
|
||||
Dim rdsCartera As New ReportDataSource With {.Name = "DSCartera", .Value = dtt2}
|
||||
lrds.Add(rdsCartera)
|
||||
Else
|
||||
Dim DTCartera As New DataTable
|
||||
@@ -800,7 +803,6 @@ Partial Class RepCxCDetalle
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepCxCDetalle.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
If Archivo.Exists Then
|
||||
ImprimirPDF(String.Format("{0}Formatos/RepCxCDetalle.rdlc", UsuarioActual.Empresa.Ruta), lrds, params, "ReporteCxCDetalle", TipoImpresion)
|
||||
@@ -808,8 +810,6 @@ Partial Class RepCxCDetalle
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepCxCDetalle.rdlc", lrds, params, "ReporteCxCDetalle", TipoImpresion)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click
|
||||
GenerarImpresion("PDF")
|
||||
|
||||
@@ -1802,19 +1802,28 @@ Partial Class General_SaldosIniciales
|
||||
Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString().ToEntero()
|
||||
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
|
||||
|
||||
|
||||
|
||||
If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorVentas = True
|
||||
' If Not CveSucursal > 0 Then Alert("No se encontró la sucursal.", TipoMensaje.MsgError) : ErrorVentas = True
|
||||
If Not CveUnidadMedida > 0 Then Alert(String.Format("No se encontró la Unidad de Medida."), TipoMensaje.MsgError) : ErrorVentas = True
|
||||
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
|
||||
'For Each drt As DataRow In dt.FiltraParametros("RFC <> ''", DistinctColumns:={"RFC"}).Rows
|
||||
' Dim RFC As String = drt("RFC").ToString().Trim.Replace("-", "").Replace(" ", "")
|
||||
' Dim CveCliente As Integer = DtClientes.FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString().ToEntero()
|
||||
' If CveCliente <= 0 Then
|
||||
' Dim OBJ As New ClsClientes
|
||||
' OBJ.AgregarClienteNoFrecuente(RFC, RFC, "", "", "", "", "", 26, RFC, "", "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1)
|
||||
' OBJ.Dispose()
|
||||
' End If
|
||||
'Next
|
||||
'GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing
|
||||
'DtClientes = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1)
|
||||
Dim CountRow As Integer = 1
|
||||
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
||||
Dim Sucursal As String = dtsubp.FiltroPrimeroValor("CveSubProyecto", $"SubProyecto = '{Row("Sucursal").ToString()}'")
|
||||
Dim TipoDocto As String = Row("Tipo Documento").ToString().Trim
|
||||
Dim RFC As String = Row("RFC").ToString().Trim
|
||||
Dim Serie As String = Row("Serie").ToString()
|
||||
Dim RFC As String = Row("RFC").ToString().Trim.Replace("-", "").Replace(" ", "")
|
||||
Dim Serie As String = Row("Serie").ToString().Trim
|
||||
Dim Folio As Integer = Row("Folio").ToString().ToEntero()
|
||||
Dim Fecha As Date = Row("Fecha").ToString().ToDate
|
||||
Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString().ToDate
|
||||
@@ -1839,14 +1848,11 @@ Partial Class General_SaldosIniciales
|
||||
IEPS = Row("IEPS").ToString().ToDecimal
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim CveClienteSucursal As Integer = 0 'Row("CveClienteSucursal").ToString().ToEntero()
|
||||
Dim FolioFiscal As String = If(dt.Columns.Contains("Folio Fiscal"), Row("Folio Fiscal").ToString(), "")
|
||||
Dim PorcentajeIVA As Decimal = If(dt.Columns.Contains("PorcentajeIVA"), Round(Row("PorcentajeIVA").ToString().ToDecimal, 4), 0)
|
||||
Dim PorcentajeRetIVA As Decimal = If(dt.Columns.Contains("PorcentajeRetIVA"), Round(Row("PorcentajeRetIVA").ToString().ToDecimal, 4), 0)
|
||||
Dim PorcentajeRetISR As Decimal = If(dt.Columns.Contains("PorcentajeRetISR"), Round(Row("PorcentajeRetISR").ToString().ToDecimal, 4), 0)
|
||||
|
||||
Dim PedidoContrato As String = If(dt.Columns.Contains("Pedido"), Row("Pedido").ToString(), "")
|
||||
|
||||
GuardaLog(Sucursal + "-" + Row("Folio").ToString())
|
||||
@@ -1855,7 +1861,6 @@ Partial Class General_SaldosIniciales
|
||||
Dim Folio2 As String = "" ' Row("Folio2").ToString()
|
||||
Dim CodCliente As String = "" 'Row("CodCliente2").ToString()
|
||||
|
||||
|
||||
Dim IEPSDetalle As Decimal = 0
|
||||
Dim CantidadDetalle As Decimal = 0
|
||||
Dim PUDetalle As Decimal = 0
|
||||
@@ -1880,13 +1885,11 @@ Partial Class General_SaldosIniciales
|
||||
Alert($"El código del producto no se encontro, error en registro {CountRow}")
|
||||
ErrorVentas = True
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert($"El código es requerido, error en registro {CountRow}")
|
||||
ErrorVentas = True
|
||||
End If
|
||||
|
||||
|
||||
IEPSDetalle = Row("IEPS").ToString.ToDecimal
|
||||
CantidadDetalle = Row("Cantidad").ToString.ToDecimal
|
||||
PUDetalle = Row("PU").ToString.ToDecimal
|
||||
@@ -1913,7 +1916,7 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
|
||||
'If Not CveCliente > 0 Then Alert(String.Format("No se encontró el cliente con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorVentas = True : RFC.GuardaLog : Exit For
|
||||
TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESO", "INGRESOS", "ING"), "Ing", IIf(TipoDocto.ToUpper.Contiene("EGRESO", "EGRESOS", "EGS"), "Egs", "Rem")).ToString()
|
||||
TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESO", "INGRESOS", "ING", "FACTURA", "FACTURAS"), "Ing", IIf(TipoDocto.ToUpper.Contiene("EGRESO", "EGRESOS", "EGS"), "Egs", "Rem")).ToString()
|
||||
'PrePóliza
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Venta/SaldoInicial", 1, Total, Total, 1, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ public partial class Inventarios_RepMovimientosSalida : ClsPaginas
|
||||
InicializaValores();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString();
|
||||
|
||||
@@ -42,6 +42,12 @@ Partial Class OS_RepOSMedicas
|
||||
DdlTecnico.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlTecnico.Items.Insert(1, New ListItem("Sin Asignar", "-2"))
|
||||
|
||||
'376
|
||||
If UsuarioActual.TienePermisoProceso(376) Then
|
||||
DdlTecnico.Enabled = False
|
||||
DdlTecnico.SelectedValueExist(UsuarioActual.CveUsuario)
|
||||
End If
|
||||
|
||||
|
||||
If IfNull(Request("CveUsuarioTecnico"), 0).ToString.ToEntero > 0 Then
|
||||
DdlTecnico.SelectedValueExist(Request("CveUsuarioTecnico").ToString)
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<%-- Filtro Visible - Consulta --%>
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
|
||||
@@ -290,14 +290,14 @@
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold text-primary">Folio:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFolio" runat="server" ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFolio" runat="server" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold text-primary">Numero de Pasajeros:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtCantidadPasajeros" runat="server" ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCantidadPasajeros" runat="server" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -314,8 +314,7 @@
|
||||
<label class="col-md-4">Servicio:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" Width="100%" TextMode="MultiLine"
|
||||
Rows="2"
|
||||
ReadOnly="true"></asp:TextBox>
|
||||
Rows="2" ></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -323,15 +322,14 @@
|
||||
<label class="col-md-4">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" Width="100%" TextMode="MultiLine"
|
||||
Rows="2"
|
||||
ReadOnly="true"></asp:TextBox>
|
||||
Rows="2" ></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Lugar de Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -339,7 +337,7 @@
|
||||
<label class="col-md-4">Fecha Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control"
|
||||
ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
Width="100%"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -348,7 +346,7 @@
|
||||
<label class="col-md-4">Fecha Regreso:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control"
|
||||
ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Partial Class RepContratosCalendario
|
||||
|
||||
Public Property Contrato As String
|
||||
Get
|
||||
Return ViewState("Contrato").ToString()
|
||||
Return IfNull(ViewState("Contrato"), "").ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Contrato") = value
|
||||
@@ -29,10 +29,11 @@ Partial Class RepContratosCalendario
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
|
||||
txtFechaF.Text = DateTime.Now.AddDays(7).ToShortDateString
|
||||
|
||||
|
||||
If Not IsPostBack Then
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString
|
||||
txtFechaF.Text = DateTime.Now.AddDays(7).ToShortDateString
|
||||
InicializaCombos()
|
||||
InicializaCalendar()
|
||||
CargaDatos()
|
||||
@@ -54,6 +55,7 @@ Partial Class RepContratosCalendario
|
||||
|
||||
ObjContratos.Dispose()
|
||||
GvContratos.DataBind()
|
||||
UpTitulos.Update()
|
||||
End Sub
|
||||
Private Sub InicializaCalendar()
|
||||
|
||||
@@ -122,6 +124,7 @@ Partial Class RepContratosCalendario
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
If Contrato.ToEntero <= 0 Then Contrato = CveContrato.Value
|
||||
If ObjContratos.UpdateContratos(Contrato.ToEntero, TxtFolio.Text, TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34, CveContratosEstatus:=DdlEstatusContrato.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero) Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Actualizado Correctamente.")
|
||||
@@ -185,4 +188,7 @@ Partial Class RepContratosCalendario
|
||||
ObjContratos.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -353,7 +353,7 @@ Partial Class Ventas_PVCobranza
|
||||
Dim ObjIE As New ClsBancos(ObjConta.IniciaTransacSQL())
|
||||
Dim ObjVentas2 As New ClsVentas(ObjConta.IniciaTransacSQL())
|
||||
Try
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("PVCobranza", 11, 0, 0, 1, Fecha, $"Pago {VentaActual.SerieFolio}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("PVCobranza", 11, 0, 0, 1, Fecha, $"Pago {VentaActual.SerieFolio}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
|
||||
|
||||
@@ -1077,7 +1077,7 @@
|
||||
<th id="ThProyecto" runat="server">
|
||||
<asp:Label runat="server" ID="LblProyectoHeader" Text="" />
|
||||
<asp:Label runat="server" ID="LblSubProyecto" Text="" /></th>
|
||||
<th>P.U. <asp:LinkButton ID="ImgDescPU" runat="server" Text="<i class='fa fa-comment-o'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" /></th>
|
||||
<th>P.U. <asp:LinkButton ID="ImgDescPU" runat="server" Text="<i class='fa fa-comment-o'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" Visible="false" /></th>
|
||||
<th id="thEncDesc1" runat="server" visible="true">Desc
|
||||
</th>
|
||||
<th id="thPredial1" runat="server" visible="false">Predial
|
||||
@@ -8022,7 +8022,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12" runat="server" id="DivRazonSocial2">
|
||||
<div id="DivNombreCliente" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtNombreCliente" CssClass="form-control " runat="server" MaxLength="150" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombreCliente" runat="server" ControlToValidate="TxtNombreCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtNombreCliente.ClientID.ToString()%>">Razón Social:</label>
|
||||
</div>
|
||||
|
||||
@@ -6446,6 +6446,7 @@ Partial Class Ventas
|
||||
Private Sub CargaUsoCFDI()
|
||||
DdlUsoCFDI.Items.Clear()
|
||||
DdlSucursalUsoCFDI.Items.Clear()
|
||||
DdlUsoCFDI.ClearSelection()
|
||||
|
||||
Dim EsPersonaMoral As Boolean = (TipoPersona = True)
|
||||
|
||||
@@ -6780,7 +6781,7 @@ Partial Class Ventas
|
||||
ViewState("CliPais") = ObjCliente.Pais
|
||||
ImprimeNombreSucursal = ObjCliente.ImprimeNombreSucursal
|
||||
|
||||
RegimenFiscalCliente = ObjCliente.DtResultados(0)("CodigoRegimenFiscal").ToString()
|
||||
RegimenFiscalCliente = If(ObjCliente.CveRegimenFiscal > 0, ObjCliente.DtResultados(0)("CodigoRegimenFiscal").ToString(), "")
|
||||
RegimenSociedad = ObjCliente.DtResultados(0)("RegimenSociedad").ToString()
|
||||
TipoPersona = CBool(ObjCliente.DtResultados(0)("TipoPersona"))
|
||||
CargaUsoCFDI()
|
||||
@@ -24050,20 +24051,20 @@ Partial Class Ventas
|
||||
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 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
|
||||
'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 As DataTable = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")
|
||||
|
||||
Reference in New Issue
Block a user