Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -7994,6 +7994,16 @@ Public Class ClsPaginas
|
||||
Next
|
||||
End If
|
||||
|
||||
'TEMPORAL, DEBE CAMBIARSE A FUNCIONALIDAD
|
||||
If Vta.CveEmpresa.Contiene(172, 173) Then
|
||||
Dim ArchivoStimulsfot As New System.IO.FileInfo(RutaFormato.Replace(".rdlc", ".mrt"))
|
||||
If ArchivoStimulsfot.Exists Then
|
||||
UsarStimulsoft = True
|
||||
|
||||
params.Add(New ReportParameter("RegimenFiscalEmpresa", String.Format("{0} - {1}", UsuarioActual.Empresa.CodigoRegimenFiscal, UsuarioActual.Empresa.RegimenFiscal)))
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not UsarStimulsoft Then
|
||||
Dim Archivo As New System.IO.FileInfo(RutaFormato)
|
||||
If Archivo.Exists Then
|
||||
@@ -8038,6 +8048,30 @@ Public Class ClsPaginas
|
||||
Else
|
||||
RutaFormato = RutaFormato.Replace(".rdlc", ".mrt")
|
||||
retorno = StreamBytesStimulsoft("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF")
|
||||
|
||||
'TEMPORAL, EMPRESAS EN LAS QUE SE UTILIZARA PRIMERO STIMULSOFT
|
||||
If Vta.CveEmpresa.Contiene(172, 173) Then
|
||||
Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
|
||||
If Guardar Then
|
||||
If Not ArchivoPDF.Exists Then
|
||||
Try
|
||||
DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta))
|
||||
DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto))
|
||||
File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
|
||||
Catch ex As Exception
|
||||
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
|
||||
End Try
|
||||
Else
|
||||
Try
|
||||
ArchivoPDF.Delete()
|
||||
File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno)
|
||||
Catch ex As Exception
|
||||
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia)
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -8089,7 +8123,7 @@ Public Class ClsPaginas
|
||||
For Each rds As ReportDataSource In DataSource
|
||||
Dim Nombre As String = rds.Name
|
||||
|
||||
If RutaReporte.Contains("Factura.mrt") Then
|
||||
If RutaReporte.Contains("Factura.mrt") OrElse RutaReporte.Contains("Remision.mrt") OrElse RutaReporte.Contains("Cotizacion.mrt") OrElse RutaReporte.Contains("NotaDevolucion.mrt") Then
|
||||
Select Case rds.Name
|
||||
Case "DsOC"
|
||||
Nombre = "DtDetalle"
|
||||
|
||||
@@ -341,6 +341,7 @@ Public Class ClsSisEmpresas
|
||||
_Empresa.CP = Data.Rows(0)("CP").ToString().ToEntero
|
||||
_Empresa.Regimen = Data.Rows(0)("Regimen").ToString
|
||||
_Empresa.CodigoRegimenFiscal = Data.Rows(0)("CodigoRegimenFiscal").ToString
|
||||
_Empresa.RegimenFiscal = Data.Rows(0)("RegimenFiscal").ToString
|
||||
_Empresa.RFC = Data.Rows(0)("RFC").ToString
|
||||
_Empresa.CURP = Data.Rows(0)("CURP").ToString
|
||||
_Empresa.Telefono = Data.Rows(0)("Telefono").ToString
|
||||
|
||||
@@ -64,7 +64,8 @@ Public Class Empresa
|
||||
Public Property Importe As Decimal
|
||||
Public Property CveMetodoPago As Integer
|
||||
|
||||
Public Property CodigoRegimenFiscal As String
|
||||
Public Property CodigoRegimenFiscal As String
|
||||
Public Property RegimenFiscal As String
|
||||
Public Property EstatusFacturacion As Boolean
|
||||
Public Property Estatus As Boolean
|
||||
Public Property UsaContabilidad As Boolean
|
||||
|
||||
@@ -99,7 +99,7 @@ Partial Class Bancos_CuentasBancariasDetalle
|
||||
Private Sub CargaCuentasContables()
|
||||
Dim dt As DataTable = Nothing
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
Using ObjContabilidad As New ClsContabilidad
|
||||
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
|
||||
If ObjContabilidad.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||
@@ -122,7 +122,7 @@ Partial Class Bancos_CuentasBancariasDetalle
|
||||
trCuentaContableComplementaria.Visible = True
|
||||
|
||||
Else
|
||||
If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Or UsuarioActual.Empresa.UsaAC Then
|
||||
Dim IdPadre As Integer
|
||||
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
@@ -212,36 +212,24 @@ Partial Class Bancos_CuentasBancariasDetalle
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
If ExisteEnIntems Then
|
||||
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContable.ToString)
|
||||
Else
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim objCont As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
|
||||
If objCont.GetCuentas(ObjCuentasBancariasDetalle.IdCtaContable, "-1", -1) Then
|
||||
If objCont.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
DDlCuentaContable.Items.Add(New ListItem(objCont.DtResultados.Rows(0)("CtaCodigo").ToString, objCont.DtResultados.Rows(0)("id").ToString))
|
||||
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContable.ToString)
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
objCont.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
DdlCuentaContableComplementaria.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContableComplementaria.ToString)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
@@ -14339,7 +14339,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'SI PUEDE RECIBIR POR OC Y COMPRA
|
||||
' si usa almacen, si tiene activado que reciba por OC, y que si la compra tipo Proveedor. que lo muestre
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
|
||||
If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
|
||||
DivOCVinculaInv.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" data-sort="true" Width="99%" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" data-sort="true" Width="99%" AutoGenerateColumns="False" EmptyDataText="No se encontraron compras con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
|
||||
@@ -406,7 +406,7 @@ Partial Class RepCxPDetalle
|
||||
TMP_DTDatos = ObjMovtos.DtResultados
|
||||
TMP_DTDatos.Columns.Add("Cuenta")
|
||||
|
||||
If DdlGrupo.SelectedValue.ToEntero = 5 And UsuarioActual.Empresa.UsaContabilidad Then 'cuando es grupo por proveedor, se muestra la cuneta contable
|
||||
If DdlGrupo.SelectedValue.ToEntero = 5 And UsuarioActual.Empresa.TipoContabilidad = 2 Then 'cuando es grupo por proveedor, se muestra la cuneta contable
|
||||
TMP_DTDatos = CargaCuentasContables(TMP_DTDatos)
|
||||
GvDatos.Columns(13).Visible = True
|
||||
Else
|
||||
|
||||
@@ -736,8 +736,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Private Sub CargaClientes()
|
||||
DdlClientes.setEsWebService(True)
|
||||
DdlClientes.Attributes.Add("data-metodo", "getcliente")
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlClientes.DataBind()
|
||||
'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
'DdlClientes.DataBind()
|
||||
' DdlClientes.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
End Sub
|
||||
|
||||
@@ -1359,16 +1359,17 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
If CveCliente > 0 Then
|
||||
DvModalconceptoCliente.Visible = True
|
||||
DdlClientesE.SelectedValue = CveCliente
|
||||
DdlClientesE.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", "")
|
||||
DdlClientesE_SelectedIndexChanged(DdlClientesE, e)
|
||||
|
||||
DdlClientesE.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", "")
|
||||
DdlClientesE.ddl.Items.Insert(0, New ListItem(GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", ""), CveCliente))
|
||||
DdlClientesE.SelectedValue = CveCliente
|
||||
|
||||
CargaVentasE(CveCliente)
|
||||
End If
|
||||
If CveVenta > 0 Then
|
||||
DdlVentasE.SelectedValueExist(CveVenta)
|
||||
End If
|
||||
|
||||
|
||||
If CveClasificacion > 0 Then
|
||||
DdlClasificacionesE.SelectedValue = CveClasificacion
|
||||
End If
|
||||
@@ -1621,11 +1622,20 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlClientesE.setEsWebService(True)
|
||||
|
||||
DdlClientesE.Attributes.Add("data-metodo", "getcliente")
|
||||
'DdlClientesE.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
'DdlClientesE.DataBind()
|
||||
' DdlClientes.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
|
||||
End Sub
|
||||
Private Sub CargaVentasE(CveCliente As Integer, Optional CveMoneda As Integer = -1)
|
||||
Private Sub CargaVentasE(CveCliente As Integer)
|
||||
If CveCliente <= 0 Then Exit Sub
|
||||
|
||||
If DrConceptoContable IsNot Nothing Then
|
||||
Dim AplicaME = Boolean.Parse(DrConceptoContable("EsMonedaExtranjera").ToString)
|
||||
Dim AplicaVenta = Boolean.Parse(DrConceptoContable("AplicaVenta").ToString)
|
||||
If AplicaME Then
|
||||
CveMoneda = 2
|
||||
End If
|
||||
If Not AplicaVenta Then Exit Sub
|
||||
End If
|
||||
|
||||
DvModalconceptoVenta.Visible = True
|
||||
DdlVentasE.DataSource = Nothing
|
||||
DdlVentasE.ClearSelection()
|
||||
@@ -1661,16 +1671,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange
|
||||
Dim tCveMoneda As Integer = 1
|
||||
|
||||
If DrConceptoContable IsNot Nothing Then
|
||||
Dim AplicaME = Boolean.Parse(DrConceptoContable("EsMonedaExtranjera").ToString)
|
||||
If AplicaME Then
|
||||
tCveMoneda = 2
|
||||
End If
|
||||
End If
|
||||
If DdlClientesE.SelectedValue.ToEntero > 0 Then CargaVentasE(DdlClientesE.SelectedValue.ToEntero)
|
||||
|
||||
CargaVentasE(DdlClientesE.SelectedValue.ToEntero, tCveMoneda)
|
||||
End Sub
|
||||
|
||||
Private Function CargaValidacionesConcepto() As Boolean
|
||||
@@ -1853,7 +1856,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
|
||||
UpTotalCargo.Update()
|
||||
UpTotalAbono.Update()
|
||||
DdlClientesE.SelectedValue = "-1"
|
||||
DdlClientesE.ddl.Items.Clear()
|
||||
DdlClientesE.SelectedText = ""
|
||||
|
||||
End If
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px; display:none;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<div class="col-md-2" style=" display:none;">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" Width="150px" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
@@ -842,8 +842,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim DtPendientes As New DataTable
|
||||
|
||||
If ObjInventarios.ComprasPendientesAlmacenGet(-1, TxtFechaPendientes.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Dim FiltroTemporal = If(UsuarioActual.CveEmpresa.Contiene(119, 140, 1, 72, 80, 153, 154), "AND TipoDocto IN ('Fac','NC','DEV')", "AND TipoDocto IN ('Fac')")
|
||||
DtPendientes = ObjInventarios.DtResultados.FiltraParametros($"CantOC >= 0 {FiltroTemporal}")
|
||||
DtPendientes = ObjInventarios.DtResultados.FiltraParametros($"CantOC >= 0 AND TipoDocto IN ('Fac','NC','DEV') ")
|
||||
Else
|
||||
DtPendientes = Nothing
|
||||
Alert("Ocurrió un error al obtener las Compras pendientes de recibir del proveedor. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
|
||||
Reference in New Issue
Block a user