Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1363,7 +1363,7 @@ Public Class ClsBancos
|
||||
_Folio = SqlAdapter.SelectCommand.Parameters("@FolioRegistro").Value.ToString
|
||||
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
If Ex1.Message.Contains("Número: 2627;") Or Ex1.Message.Contains("Número: 2601;") Then
|
||||
Alert("Ya existe un movimiento bancario con el mismo Folio: <b>" & Folio & "</b>.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al Guardar el Movimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
|
||||
@@ -6376,9 +6376,9 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim DTDistinct = DT.Copy
|
||||
If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF, 0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
|
||||
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF, 0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
|
||||
Else
|
||||
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
|
||||
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
|
||||
End If
|
||||
'RMF, si es concepto relacionado a flete o importacion, no debe de afectar al gasto
|
||||
If CveFlete > 0 OrElse CveImportacion > 0 Then
|
||||
@@ -16603,7 +16603,7 @@ Partial Class Compras_Compras
|
||||
End Sub
|
||||
Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If Modalidad <> "U" Or Not CveFactura > 0 Then
|
||||
DdlPSChange()
|
||||
DdlPSChange()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub DdlPSChange()
|
||||
@@ -16635,9 +16635,10 @@ Partial Class Compras_Compras
|
||||
If ViewState("IVAPS").ToString.ToEntero() = -1 Then
|
||||
Dim Drr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero())(0)
|
||||
ViewState("IVAPS") = Drr("IVA").ToString().ToDouble()
|
||||
|
||||
'DdlIVA.Enabled = True
|
||||
|
||||
DdlProyecto.SelectedValueExist(Drr("CveProyecto"))
|
||||
|
||||
'DdlIVA.Enabled = True
|
||||
|
||||
If Not Modalidad = "U" Then
|
||||
|
||||
Select Case ViewState("IVAPS").ToString().ToDouble
|
||||
|
||||
1822
Empresas/Grales/Formatos/Ajuste.rdlc
Normal file
1822
Empresas/Grales/Formatos/Ajuste.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -374,7 +374,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
#Region " PERMISOS PAGINAS "
|
||||
Private Function PermiteGuardar() As Boolean
|
||||
Return If(UsuarioActual.TienePermisoProceso(181) Or EsConsumoInterno, True, False)
|
||||
Return True 'If(UsuarioActual.TienePermisoProceso(181) Or EsConsumoInterno, True, False)
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Este permiso solo habilita el Btn del GV. Debe ir en conjunto con el permiso 181 [PermiteGuardar]
|
||||
|
||||
@@ -2755,6 +2755,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpAjuste" runat="server" class="portlet-body form" UpdateMode="Conditional">
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnPDFHistorial" />
|
||||
</Triggers>
|
||||
<ContentTemplate>
|
||||
<div class="col-md-1" id="DivAjuste" runat="server" visible="false">
|
||||
<div class="portlet light xspadding bordered">
|
||||
@@ -2764,10 +2767,10 @@
|
||||
<span class="caption-subject bold uppercase">Ajuste </span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:LinkButton ID="BtnPDFHistorial" OnClick="BtnPDFHistorial_Click" runat="server" data-toggle="tooltip" Title="PDF"><i class="fa fa-file-pdf-o" style="font-size:15px; font-weight:bold; color:dimgray;"></i></asp:LinkButton>
|
||||
<a href="javascript;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -3129,7 +3132,7 @@
|
||||
|
||||
var Descuento = parseFloat($get("TxtDescP").value);
|
||||
$get("TxtPorDescP").value = Descuento * 100 / Monto * 10
|
||||
$get("LblPrecioFinal").innerText = formato_numero(Monto - Descuento, 2, '.', ',');
|
||||
$get("LblPrecioFinal").innerText = formato_numero(Monto - Descuento, 2, '.', ',');
|
||||
$get("TxtPrecio").value = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
|
||||
var Total = Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
|
||||
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
|
||||
|
||||
@@ -8,6 +8,7 @@ Imports System.Linq
|
||||
Imports System.Security.Cryptography.X509Certificates
|
||||
Imports System.Globalization
|
||||
Imports System.Net.Http
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class PV
|
||||
Inherits ClsPaginas
|
||||
@@ -5654,6 +5655,43 @@ Partial Class PV
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnPDFHistorial_Click(sender As Object, e As EventArgs)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim DtDatos As New DataTable
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
'Informacion Distribuidor
|
||||
params.Add(New ReportParameter("NombreCliente", LtlCliente.Text))
|
||||
params.Add(New ReportParameter("CiudadEstado", LblCiudad.Text.Trim + ", " + LblEstado.Text))
|
||||
params.Add(New ReportParameter("TelCliente", LblTelefono.Text))
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Consec", TxtConsecutivoAjuste.Text.Trim))
|
||||
params.Add(New ReportParameter("FolioAcuse", If(DdlFolioGarantia.SelectedValue.ToEntero = -1, "", DdlFolioGarantia.SelectedItem.Text)))
|
||||
|
||||
'Informacion de Garantia o ajuste
|
||||
params.Add(New ReportParameter("Fecha", TxtFechaAjuste.Text.Trim))
|
||||
params.Add(New ReportParameter("Defecto", If(DdlTipoDefecto.SelectedValue.ToEntero = -1, "", DdlTipoDefecto.SelectedItem.Text)))
|
||||
params.Add(New ReportParameter("MesesUso", TxtMesesUso.Text.Trim))
|
||||
params.Add(New ReportParameter("PorcentajeAjuste", TxtPorcentajeAjuste.Text.Trim))
|
||||
|
||||
'Informacion Acumulador
|
||||
|
||||
|
||||
'Informacion Vehiculo
|
||||
params.Add(New ReportParameter("MarcaAuto", ""))
|
||||
params.Add(New ReportParameter("TipoAuto", ""))
|
||||
|
||||
'Informacion Consumidor
|
||||
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF")
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1335,6 +1335,17 @@ Partial Class Ventas
|
||||
ViewState("CveOC") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property RegistroxOC As Boolean
|
||||
Get
|
||||
Return CBool(IfNull(ViewState("RegistroxOC"), False))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("RegistroxOC") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property EnviarCorreoCliente As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("EnviarCorreoCliente").ToString)
|
||||
@@ -5662,7 +5673,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False AndAlso Not RegistroxOC Then
|
||||
'VALIDA EXISTENCIA
|
||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) Then
|
||||
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS}") < TxtCantidad.Text.ToDouble Then
|
||||
@@ -6550,8 +6561,12 @@ Partial Class Ventas
|
||||
actualindex = actualindex + 1
|
||||
Next
|
||||
End If
|
||||
Dim EsNCAmortizacion As Boolean = False
|
||||
If DdlTipoComprobante.SelectedValue = "Egs" AndAlso ChkAplicaNCAnticipo.Checked Then
|
||||
EsNCAmortizacion = True
|
||||
End If
|
||||
|
||||
GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjFactura, TmpDT, ObjFactura.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS, ObjEventos, ObjCGame, ObjClientes)
|
||||
GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjFactura, TmpDT, ObjFactura.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS, ObjEventos, ObjCGame, ObjClientes, EsNCAmortizacion:=EsNCAmortizacion)
|
||||
|
||||
'SI ES REFACTURACION
|
||||
Dim ObjNC As List(Of Object) = Nothing
|
||||
@@ -6574,57 +6589,9 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
''[IPP]
|
||||
''DATATABLES A USAR
|
||||
'Dim DtSites As New DataTable
|
||||
'Dim DtExcel As New DataTable
|
||||
|
||||
''CARGAS EXCEL EN DATATABLE
|
||||
'DtExcel = TmpDT
|
||||
|
||||
''CARGAS LOS SITES REGISTRADOS
|
||||
'If ObjBancos.GetBancos() Then
|
||||
' DtSites = ObjBancos.DtResultados
|
||||
'End If
|
||||
|
||||
''PROCESAS EXCEL
|
||||
'Dim CveSiteActual = -1
|
||||
'For Each Row As DataRow In TmpDT.Rows
|
||||
|
||||
' 'VALIDA QUE EXISTA EL SITE
|
||||
' If DtExcel.Select($"Site = {Row("SITE")}").Count = 0 Then 'SI NO EXISTE AGREGA EL SITE
|
||||
' CveSiteActual = ObjBancos.AddComplementoPago(-1, -1, "", -1, -1, -1)
|
||||
|
||||
' 'VALIDAS QUE SE HALLA AGREGADO
|
||||
' If CveSiteActual > 0 Then
|
||||
' 'AGREGA NUEVO SITE AL DATATABLE TEMPORAL DE SITES
|
||||
' Dim DrNuevoSite = DtExcel.NewRow
|
||||
' DrNuevoSite("CVE") = CveSiteActual
|
||||
' DrNuevoSite("SITE") = Row("SITE")
|
||||
' Else
|
||||
' Alert("ERROR AL AGREGAR EL SITE")
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' ElseIf DtExcel.Select($"Site = {Row("SITE")}").Count = 1 Then 'SI EXISTE OBTIENES CVE
|
||||
' CveSiteActual = DtExcel.Select($"Site = {Row("SITE")}")(0)("Cve").ToString.ToEntero
|
||||
' Else
|
||||
' Alert("ERROR SOLO DEBE DAR RESULTADO 0 ó 1")
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' 'AGREGA A TABLA CON LA DE MAS INFORMACION
|
||||
' If Not ObjBancos.AddBancos_EstatusIE(CveSiteActual, Row("CAMPOS").ToString, Row("CAMPOS_EXTRA").ToString.ToEntero) Then
|
||||
' Alert("ERROR AL GUARDAR")
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
'Next
|
||||
|
||||
|
||||
|
||||
'SI ES amortizacion 3.3
|
||||
Dim Obj2 As New List(Of Object)
|
||||
'SI ES amortizacion 3.3
|
||||
Dim Obj2 As New List(Of Object)
|
||||
|
||||
If ErrorList.Count = 0 Then
|
||||
' cambiar la condicion para saber si hay seleccionado
|
||||
@@ -8008,7 +7975,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso DdlTipoRelacionAnticipo.SelectedValue.ToEntero > 0 Then ' refacturación
|
||||
ObjFactura.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero
|
||||
ObjFactura.CveTipoRelacion = DdlTipoRelacionAnticipo.SelectedValue.ToEntero
|
||||
If GVAnticipos.Rows.Count > 0 Then
|
||||
For Each gvr As GridViewRow In GVAnticipos.Rows
|
||||
If gvr.FCCheckBox(String.Format("Chk{0}", gvr.RowIndex)).Checked AndAlso gvr.DataKey("CveConceptoContable") = "12" Then ' solo notas de crédito
|
||||
@@ -8773,6 +8740,7 @@ Partial Class Ventas
|
||||
If GVOC.Rows.Count > 0 Or GvOCPS.Rows.Count > 0 Then
|
||||
'Checa las facturas selecionadas
|
||||
VerificaOrdenesCompra(DTOrdenesCompra)
|
||||
RegistroxOC = False
|
||||
|
||||
Dim dtSeleccionadas As DataTable = DTOrdenesCompra.FiltraParametros("Aplicado = True")
|
||||
If GvPS.Rows.Count > 0 Then
|
||||
@@ -8815,7 +8783,7 @@ Partial Class Ventas
|
||||
sb.Remove(sb.Length - 1, 1)
|
||||
If ObjClientes.GetVentasOCTotales(CveCliente, sb.ToString, If(ChkPSOC.Checked, 2, 1)) Then
|
||||
DTOrdenesCompraPS = ObjClientes.DtResultados
|
||||
|
||||
RegistroxOC = True
|
||||
Dim tCantidad As Decimal = 0
|
||||
For Each Dr As DataRow In DTOrdenesCompraPS.Select()
|
||||
tCantidad = If(ChkPSOC.Checked, GvOCPS.Rows(IndiceGVDataKey(GvOCPS, "CveOrdenCompraDetalle", $"{Dr("CveOrdenCompraDetalle")}")).FCTextBox("TxtCantidadOC").Text, Dr("Cantidad")).ToString.ToDecimal
|
||||
@@ -9252,7 +9220,7 @@ Partial Class Ventas
|
||||
|
||||
If ErrorList.Count = 0 Then
|
||||
'prepoliza
|
||||
GuardarVentaPrePolizas(ObjConta, factura, TmpDTDetalle, CveNCaVincular, objContPaqi, ObjBancos, ObjVentas, ObjEventos:=ObjEventos)
|
||||
GuardarVentaPrePolizas(ObjConta, factura, TmpDTDetalle, CveNCaVincular, objContPaqi, ObjBancos, ObjVentas, ObjEventos:=ObjEventos, EsNCAmortizacion:=EsNCAmortizacion)
|
||||
If ErrorList.Count = 0 Then
|
||||
'inventarios
|
||||
If Not EsNCAmortizacion Then
|
||||
@@ -9300,7 +9268,7 @@ Partial Class Ventas
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" Then
|
||||
If factura.CvePrePoliza > 0 Then
|
||||
|
||||
If ProcesoPrepolizas(ObjConta, factura, CveIE, TmpDTDetalleMovimientos, objContPaqi, 1, ObjBancos, ObjVentas, ObjEventos:=ObjEventos) Then
|
||||
If ProcesoPrepolizas(ObjConta, factura, CveIE, TmpDTDetalleMovimientos, objContPaqi, 1, ObjBancos, ObjVentas, ObjEventos:=ObjEventos, EsNCAmortizacion:=EsNCAmortizacion) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar los Movimientos de la prepoliza.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
End If
|
||||
|
||||
@@ -9558,9 +9526,8 @@ Partial Class Ventas
|
||||
TipoCambioNC = GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal
|
||||
End If
|
||||
|
||||
If Not EsNCAmortizacion Then
|
||||
'APLICA NC SALDOS DIRECTOS
|
||||
If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then
|
||||
'APLICA NC SALDOS DIRECTOS
|
||||
If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then
|
||||
For Each Dr As DataRow In DtVentasNC.Rows
|
||||
|
||||
|
||||
@@ -9698,8 +9665,6 @@ Partial Class Ventas
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'APLICA DEVOLUCION SALDOS DIRECTOS
|
||||
If AplicaDevolucion Then
|
||||
@@ -10101,20 +10066,12 @@ Partial Class Ventas
|
||||
|
||||
importeMovimiento = 0
|
||||
Case 150 'Descuento sobre ventas
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") AndAlso Not EsNCAmortizacion Then
|
||||
|
||||
Dim ConceptoContableAplicar = 150
|
||||
Dim CveVentaAplicar = ObjFactura.CveVenta
|
||||
Dim CveVentaAmortizacionAplicar = -1
|
||||
|
||||
'cuando es NC, por amortización de anticipo, no debe de registrar el concepto 11,
|
||||
'pero cuando es NC y se aplicó anticipo, debe de restarle el importe
|
||||
If ObjFactura.TipoDocto.Contiene("Egs") And CveAnticipo > 0 AndAlso (DdlTipoComprobante.SelectedValue = "Ing" Or (DdlTipoComprobante.SelectedValue = "Egs" AndAlso ChkAplicaNCAnticipo.Checked = True)) Then
|
||||
ConceptoContableAplicar = 11
|
||||
CveVentaAplicar = CveAnticipo
|
||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
|
||||
'código fijo en base el porcentaje iva, que se afecten las clasificaciones
|
||||
@@ -10123,16 +10080,6 @@ Partial Class Ventas
|
||||
'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
|
||||
If Not TmpDTDetalle(i)("CveClasificacion").ToString.Contiene("19958", "19933", "18097") Then
|
||||
|
||||
'If TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal > 0 Then
|
||||
' If TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal = 0.08 Then
|
||||
' TmpDTDetalle(i)("CveClasificacion") = 20242 'clasif: ventas tasa 8%
|
||||
' Else
|
||||
' TmpDTDetalle(i)("CveClasificacion") = 19929 'clasif: ventas tasa 16%
|
||||
' End If
|
||||
'Else
|
||||
' TmpDTDetalle(i)("CveClasificacion") = 19930 'clasif: ventas tasa 0%
|
||||
'End If
|
||||
|
||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then
|
||||
TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveClasificacion").ToString
|
||||
End If
|
||||
@@ -15879,6 +15826,10 @@ Partial Class Ventas
|
||||
TxtOrdenCompra.Enabled = True
|
||||
TxtPedidoContrato.Enabled = True
|
||||
TxtObsAlmacen.Enabled = True
|
||||
DdlUsoCFDI.Enabled = True
|
||||
DdlMetodoPago33.Enabled = True
|
||||
DdlFormaPago33.Enabled = True
|
||||
UPCondicionesPago.Update()
|
||||
|
||||
ModalidadEdicion = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user