This commit is contained in:
2022-10-11 00:42:03 -07:00
73 changed files with 14617 additions and 20400 deletions

View File

@@ -10134,19 +10134,30 @@ Public Class ClsPaginas
If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
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 UsuarioActual.CveEmpresa.Contiene(119) Then
If Pago.FechaDocumentoRelacionado.Year <= 2017 Then
Dim ObjCliente As New ClsClientes(ObjConta.IniciaTransacSQL())
If ObjCliente.GetClientes(VentaActual.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) AndAlso ObjCliente.DtResultados.Rows.Count > 0 Then
If Pago.CveMonedaPago > 1 Then VentaActual.IdCtaContableClienteAnticipoExtranjera = ObjCliente.IdCtaContMonedaExtranjera Else VentaActual.IdCtaContableClienteAnticipo = ObjCliente.IdCtaContClientes
End If
End If
End If
End If
If Pago.CveMonedaPago > 1 Then
'Agregamos la Extranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 66, Pago.Referencia, Concepto, Ret.IdCtaContableAcreditable, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
'Agregamos la Extranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipo, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, Ret.IdCtaContablexAcreditar, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
Else
'Agregamos Nacional
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 66, Pago.Referencia, Concepto, Ret.IdCtaContableAcreditable, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
Else
'Agregamos Nacional
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoExtranjera, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
End If
End If
End If

View File

@@ -4831,7 +4831,8 @@
<br />
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvFacturaNC" OnRowDataBound="GvFacturaNC_RowDataBound" DataKeyNames="CveCompra,TipoCambio,CveTipoConcepto" runat="server" AutoGenerateColumns="false" GridLines="None" CssClass="table table-striped table-hover Widthall ScrollAD">
<asp:GridView ID="GvFacturaNC" OnRowDataBound="GvFacturaNC_RowDataBound"
DataKeyNames="CveCompra,TipoCambio,CveTipoConcepto,UUID,Saldo" runat="server" AutoGenerateColumns="false" GridLines="None" CssClass="table table-striped table-hover Widthall ScrollAD">
<Columns>
<asp:TemplateField>
<ItemTemplate>

View File

@@ -1,5 +1,6 @@
Option Explicit On
Option Strict On
Imports System.Activities
Imports System.Data
Imports System.Diagnostics
Imports System.Globalization
@@ -1151,6 +1152,21 @@ Partial Class Compras_Compras
End Property
Private Property UUIDSList As List(Of String)
Get
If ViewState("UUIDSList") Is Nothing Then
Return New List(Of String)
Else
Return DirectCast(ViewState("UUIDSList"), List(Of String))
End If
End Get
Set(value As List(Of String))
ViewState("UUIDSList") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip")
@@ -1273,21 +1289,7 @@ Partial Class Compras_Compras
TxtOC.Attributes.Add("onkeypress", "fncBuscaOC(event);")
'If UsuarioActual.Empresa.GralSoloProyecto Then
' LitHProyecto.Text = "Sucursal"
' DdlSubProyecto.Items.Clear()
' DdlAsignaSubProyecto.Items.Clear()
' divproyecto.Visible = False
' divasignaproyecto.Visible = False
' DdlProyecto.Visible = False
' DdlProyecto.Items(0).Text = ""
'End If
If UsuarioActual.CveEmpresa = 66 And UsuarioActual.TienePermisoProceso(96) Then
ChkProgramarPago.Visible = True
@@ -1374,20 +1376,7 @@ Partial Class Compras_Compras
CambiaEjercicioAC()
End If
' ''Fecha limite para ingreso de facturas
''Dim DtEmpresa As DataTable = GlobalDTEmpresas(UsuarioActual.CveEmpresa)
''If DtEmpresa.Rows.Count > 0 Then
'' Dim FechaLimite = DateSerial(DtEmpresa.Rows(0)("EjercicioActual").ToString.ToEntero, DtEmpresa.Rows(0)("PeriodoActual").ToString.ToEntero, DtEmpresa.Rows(0)("DiasPermitidos").ToString.ToEntero)
'' If Month(TxtFecha.Text.ToDate) < (Month(FechaLimite) - 1) Or (Month(TxtFecha.Text.ToDate) = (Month(FechaLimite) - 1) And Day(Date.Now) > Day(FechaLimite)) Then
'' Alert("La factura actual ya no aplica para ingresarse al sístema.", TipoMensaje.MsgAdvertencia)
'' BtnGuardar.Enabled = False
'' Else
'' Alert("En tiempo")
'' End If
''Else
'' Alert("No se pudieron cargar los datos de la empresa", TipoMensaje.MsgAdvertencia)
''End If
'Carga Compra
If UsuarioActual.Empresa.Funcionalidad(123) <> "" And Not UsuarioActual.TienePermisoProceso(156) Then
If Not ValidaCierrePeriodo() Then
@@ -1600,6 +1589,11 @@ Partial Class Compras_Compras
End If
If DdlTipoComprobante.SelectedValue = "NC" Then
NCSeleccionFacturasRelacionadas(UUIDSList)
End If
End If
'SE OCUPAN AFUERA DEL POSTBACK ??
@@ -6956,15 +6950,13 @@ Partial Class Compras_Compras
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
Exit For
ErrorPrepoliza = True : Exit For
End If
End If
Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE}
'Pago.CveMonedaPago = CveMonedaAnticipo 'pdte
AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
Next
Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE, .CveMonedaPago = rw.DataKey("CveMoneda").ToEntero}
AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
End If
Next
Else
For Each rw As GridViewRow In GvDeudores.Rows
If rw.FCCheckBox("Chk").Checked Then
@@ -6976,8 +6968,7 @@ Partial Class Compras_Compras
ErrorPrepoliza = True
Exit For
End If
Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE}
'Pago.CveMonedaPago = CveMonedaAnticipo 'pdte
Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE, .CveMonedaPago = rw.DataKey("CveMoneda").ToEntero}
AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
End If
Next
@@ -8467,14 +8458,14 @@ Partial Class Compras_Compras
PorcentajePago = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal / TxtTotal.Text.ToDecimal
Dim ImporteAntMNComision As Decimal = (ImporteAnt + ImporComisionAnticipo) * TipoCambioAnt
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, (ImporteAnt + ImporComisionAnticipo), "", CveConceptoCompra, "", TxtFechaPago.Text.ToDate, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMNComision, ImporteME:=If(TipoCambioAnt = 1, 0, (ImporteAnt + ImporComisionAnticipo)), CveSubProyecto:=CveSubProyectoAnticipo) Then
Dim ImporteAntMNComision As Decimal = (ImporteAnt + ImporComisionAnticipo)
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, (ImporteAnt + ImporComisionAnticipo), "", CveConceptoCompra, "", TxtFechaPago.Text.ToDate, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMNComision, ImporteME:=If(TipoCambioAnt = 1, 0, (ImporteAnt + ImporComisionAnticipo)), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then
ErrorMovtosCxP = 1
End If
If CveMonedaAnticipo > 1 Then
Dim ImporteAntMN As Decimal = TipoCambioAnt * ImporteAnt - ImporteAnt
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, ImporteAntMN, "", CveConceptoCompraComplementaria, "", TxtFechaPago.Text.ToDate, IdCtaContableComp, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(TipoCambioAnt = 1, 0, ImporteAnt), CveSubProyecto:=CveSubProyectoAnticipo) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimientoCompra, ImporteAntMN, "", CveConceptoCompraComplementaria, "", TxtFechaPago.Text.ToDate, IdCtaContableComp, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(TipoCambioAnt = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then
ErrorMovtosCxP = 1
End If
End If
@@ -9688,6 +9679,28 @@ Partial Class Compras_Compras
namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal")
namespaces.AddNamespace("registrofiscal", "http://www.sat.gob.mx/registrofiscal")
If _TipoComprobante.ToUpper = "E" And (Version = "3.3" Or Version = "4.0") Then
Dim UUIDS As String = ""
Dim UUIDSLista As New List(Of String)
Dim nodeCFDIRelacionados As XmlNode
nodeCFDIRelacionados = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
If nodeCFDIRelacionados IsNot Nothing Then
For Each CFDIRelacionados As XmlNode In nodeCFDIRelacionados
UUIDSLista.Add("" & CFDIRelacionados.Attributes("UUID").Value.ToString & "")
Next
End If
UUIDSList = UUIDSLista
End If
Dim node As XmlNode
node = XMLDoc.SelectSingleNode(String.Format("//{0}:Emisor", Prefijo), namespaces)
@@ -16303,7 +16316,7 @@ Partial Class Compras_Compras
Dim NumNoDed As Integer = TmpDT.COUNT("CvePS", "NoDeducible = True ")
If NumNoDed > 0 Then GvPS.Columns(11).Visible = True 'visualiza columnas de nodeducibles
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") And CveFactura <= 0 Then
InicializaAplicaNCFact()
End If
@@ -20069,11 +20082,121 @@ Partial Class Compras_Compras
End Function
Private Sub NCSeleccionFacturasRelacionadas(UUIDSListRelacioandos As List(Of String))
If UUIDSListRelacioandos.Count > 0 Then
Dim SaldoNota As Decimal = TxtTotal.Text.ToDecimal
Dim SaldoNotaPorAplicar As Decimal = SaldoNota
Dim CountAplicacion As Integer = 0
Dim sbNoencontrados As New StringBuilder
For Each UUID As String In UUIDSListRelacioandos
UUID = UUID.ToUpper
Dim UUIDEncontrado As Boolean = False
For Each GvRow As GridViewRow In GvFacturaNC.Rows
Dim UUIDGv As String = GvRow.DataKey("UUID").Trim.ToUpper
If UUID.Trim.ToUpper = GvRow.DataKey("UUID").Trim.ToUpper Then
UUIDEncontrado = True
Exit For
End If
Next
If Not UUIDEncontrado Then
sbNoencontrados.Append($"{UUID},")
End If
Next
Dim TeminarAmortizacion As Boolean = False
For Each UUID As String In UUIDSListRelacioandos
For Each GvRow As GridViewRow In GvFacturaNC.Rows
If UUID.Trim.ToUpper = GvRow.DataKey("UUID").Trim.ToUpper Then
Dim SaldoFactura As Decimal = GvRow.DataKey("Saldo").ToDecimal
If SaldoFactura <= SaldoNotaPorAplicar Then
SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura
GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.ToString("###,###,###.00")
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
Else
If SaldoFactura >= SaldoNotaPorAplicar Then
GvRow.FCTextBox("TxtImporte").Text = SaldoNotaPorAplicar.ToString("###,###,###.00")
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
SaldoNotaPorAplicar = 0
TeminarAmortizacion = True
Else
GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.ToString("###,###,###.00")
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura
TeminarAmortizacion = True
End If
End If
CountAplicacion = CountAplicacion + 1
Exit For
End If
If SaldoNotaPorAplicar <= 0 Then
TeminarAmortizacion = True
Exit For
End If
Next
If TeminarAmortizacion Then
Exit For
End If
Next
Dim TipoMesaje As TipoMensaje = TipoMensaje.ToastInformacion
TipoMesaje = If(sbNoencontrados.ToString.Length > 0 Or (SaldoNotaPorAplicar <> 0), TipoMensaje.ToastAdventencia, TipoMesaje)
Dim MsgSalida As String = ""
If sbNoencontrados.ToString.Length > 0 Then
MsgSalida = $"UUIDS no encotradas o sin saldo: {sbNoencontrados.ToString()} <br/>"
End If
MsgSalida = $"{MsgSalida}Se seleccionó {(SaldoNota - SaldoNotaPorAplicar).ToString("###,###,###.00")} de {SaldoNota.ToString("###,###,###.00")} a {CountAplicacion} factura{If(CountAplicacion > 0, "s", "")}."
Alert(MsgSalida, TipoMesaje)
If CountAplicacion > 0 Then
BtnFacturaNC_Click(Nothing, Nothing)
End If
End If
End Sub
End Class
Public Class MMensajeDevolucion
Public Property CveMovimiento As Integer
Public Property TieneError As Boolean

View File

@@ -17,7 +17,7 @@
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Anexo de Catálogo - Centro Costo
Anexo de Catálogo - Centro Costo
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
@@ -52,7 +52,7 @@
</div>
<div class="titlefiltros caption ">
<ul class="list-inline" style="font-size: 12px;">
<li>
<li>
<label style="width:55px">Ejercicio:</label>
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 80px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
</li>
@@ -104,7 +104,7 @@
<ul class="list-inline" style="font-size: 12px;">
<li> <label style="width:55px">Divisor:</label>
<li> <label style="width:55px">Divisor:</label>
<asp:DropDownList ID="DdlDivisor" Width="80px" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Text="1" Value="1"></asp:ListItem>
@@ -418,170 +418,170 @@
initamgrafica();
}
function cargaGraficaBarras2() {
function cargaGraficaBarras2() {
//Hypgrafica
$("#DivModalGrafica").modal();
$('.LblTituloGrafica').text('Grafica');
let items = []
let data;
let series = [];
$('.chkgraf input:checked').each(function () {
$('.LblTituloGrafica').text('Grafica');
let items = []
let data;
let series = [];
$('.chkgraf input:checked').each(function () {
data = $(this).closest('tr').find('.Hypgrafica').data('values')
let name = $(this).closest('tr').text().trim()
let name = $(this).closest('tr').text().trim()
items.push({ data: data, name: name })
});
if (items) {
data = items[0].data;
series.push({
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
"colorField": "Color",
"fillAlphas": 1,
"lineAlpha": 0.1,
"type": "column",
"title": items[0].name,
"valueField": 'Valor'
});
if (items) {
data = items[0].data;
series.push({
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
"colorField": "Color",
"fillAlphas": 1,
"lineAlpha": 0.1,
"type": "column",
"title": items[0].name,
"valueField": 'Valor'
})
for (var indexcol = 1; indexcol < items.length; indexcol++) {
for (var indexcol = 1; indexcol < items.length; indexcol++) {
let cdatos = items[indexcol].data;
let valueField = 'Valor' + indexcol;
for (var i = 0; i < cdatos.length; i++) {
data[i][valueField] = cdatos[i].Valor
}
series.push({
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
"colorField": "Color",
"fillAlphas": 1,
"lineAlpha": 0.1,
"type": "column",
"title": items[indexcol].name,
"valueField": valueField
})
}
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "light",
"dataProvider": data,
"startDuration": 2, "legend": {
"generateFromData": true // "data": data.map(function(num) { return {title:num.Texto ,color:num.Color}; })
},
"valueAxes": [{
"position": "left",
"title": "Ventas"
}],
"graphs": series,
"depth3D": 20,
"angle": 30,
"chartCursor": {
"categoryBalloonEnabled": false,
"cursorAlpha": 0,
"zoomable": false
},
"categoryField": "Texto",
"categoryAxis": {
"gridPosition": "start",
"labelRotation": 90
},
"export": {
"enabled": true
}
});
}
}
series.push({
"balloonText": "[[title]]: <b>[[value]]</b> [[Moneda]]",
"colorField": "Color",
"fillAlphas": 1,
"lineAlpha": 0.1,
"type": "column",
"title": items[indexcol].name,
"valueField": valueField
})
}
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "light",
"dataProvider": data,
"startDuration": 2, "legend": {
"generateFromData": true // "data": data.map(function(num) { return {title:num.Texto ,color:num.Color}; })
},
"valueAxes": [{
"position": "left",
"title": "Ventas"
}],
"graphs": series,
"depth3D": 20,
"angle": 30,
"chartCursor": {
"categoryBalloonEnabled": false,
"cursorAlpha": 0,
"zoomable": false
},
"categoryField": "Texto",
"categoryAxis": {
"gridPosition": "start",
"labelRotation": 90
},
"export": {
"enabled": true
}
});
}
}
function initamgrafica() {
AmCharts.addInitHandler(function (chart) {
function handleCustomMarkerToggle(legendEvent) {
var dataProvider = legendEvent.chart.dataProvider;
var itemIndex;
legendEvent.chart.toggleLegend = true;
if (undefined !== legendEvent.dataItem.hidden && legendEvent.dataItem.hidden) {
legendEvent.dataItem.hidden = false;
dataProvider.push(legendEvent.dataItem.storedObj);
legendEvent.dataItem.storedObj = undefined;
dataProvider.sort(function (lhs, rhs) {
return lhs.dataIdx - rhs.dataIdx;
});
} else {
legendEvent.dataItem.hidden = true;
for (var i = 0; i < dataProvider.length; ++i) {
if (dataProvider[i].dataIdx === legendEvent.dataItem.dataIdx) {
itemIndex = i;
break;
}
}
legendEvent.dataItem.storedObj = dataProvider[itemIndex];
dataProvider.splice(itemIndex, 1);
}
legendEvent.chart.validateData();
}
if (!chart.legend || !chart.legend.enabled || !chart.legend.generateFromData) {
return;
}
var categoryField = chart.categoryField;
var colorField = chart.graphs[0].lineColorField || chart.graphs[0].fillColorsField || chart.graphs[0].colorField;
var legendData = chart.dataProvider.map(function (data, idx) {
var markerData = {
"title": data[categoryField],
"color": data[colorField],
"dataIdx": idx
};
if (!markerData.color) {
markerData.color = chart.graphs[0].lineColor;
}
data.dataIdx = idx;
return markerData;
});
chart.legend.data = legendData;
chart.legend.switchable = true;
chart.legend.addListener("clickMarker", handleCustomMarkerToggle);
AmCharts.addInitHandler(function (chart) {
function handleCustomMarkerToggle(legendEvent) {
var dataProvider = legendEvent.chart.dataProvider;
var itemIndex;
legendEvent.chart.toggleLegend = true;
if (undefined !== legendEvent.dataItem.hidden && legendEvent.dataItem.hidden) {
legendEvent.dataItem.hidden = false;
dataProvider.push(legendEvent.dataItem.storedObj);
legendEvent.dataItem.storedObj = undefined;
dataProvider.sort(function (lhs, rhs) {
return lhs.dataIdx - rhs.dataIdx;
});
} else {
legendEvent.dataItem.hidden = true;
for (var i = 0; i < dataProvider.length; ++i) {
if (dataProvider[i].dataIdx === legendEvent.dataItem.dataIdx) {
itemIndex = i;
break;
}
}
legendEvent.dataItem.storedObj = dataProvider[itemIndex];
dataProvider.splice(itemIndex, 1);
}
legendEvent.chart.validateData();
}
if (!chart.legend || !chart.legend.enabled || !chart.legend.generateFromData) {
return;
}
var categoryField = chart.categoryField;
var colorField = chart.graphs[0].lineColorField || chart.graphs[0].fillColorsField || chart.graphs[0].colorField;
var legendData = chart.dataProvider.map(function (data, idx) {
var markerData = {
"title": data[categoryField],
"color": data[colorField],
"dataIdx": idx
};
if (!markerData.color) {
markerData.color = chart.graphs[0].lineColor;
}
data.dataIdx = idx;
return markerData;
});
chart.legend.data = legendData;
chart.legend.switchable = true;
chart.legend.addListener("clickMarker", handleCustomMarkerToggle);
}, ["serial"]);
}
</script>
<script>
function LimpiaCeros(Divisor) {
$('.ceros').each(function (i, obj) {
if ($(this).html() == '0.00' || $(this).html() == '0.00%') {
$(this).html('-');
}
if (!($(this).html() == '-' || $(this).html() == '' || ~$(this).html().indexOf("%"))) {
if (Divisor > 1) {
$(this).attr('data-toggle', 'tooltip');
$(this).attr('data-container', 'body');
$(this).attr('title', $(this).html());
}
$(this).html(FormatoNumeroIPP(ToDouble($(this).html()) / Divisor, ((Divisor == 1) ? 2 : 0)));
}
if (ToDouble($(this).html()) < 0) {
$(this).css("color", "red");
}
});
}
function FormatoNumeroIPP(Importe, Decimales) {
if (typeof Decimales === 'undefined') { Decimales = 2; }
if (isNaN(parseInt(Importe))) return "NaN";
var tmpNum = Importe;
tmpNum = tmpNum.toFixed(Decimales).replace(/./g, function (c, i, a) {
return i && c !== "." && !((a.length - i) % 3) ? ',' + c : c;
});
return tmpNum;
}
function pageLoad(sender, e) {
$(document).ready(function () {
$('[data-toggle="tooltip"]').tooltip();
});
}
<script>
function LimpiaCeros(Divisor) {
$('.ceros').each(function (i, obj) {
if ($(this).html() == '0.00' || $(this).html() == '0.00%') {
$(this).html('-');
}
if (!($(this).html() == '-' || $(this).html() == '' || ~$(this).html().indexOf("%"))) {
if (Divisor > 1) {
$(this).attr('data-toggle', 'tooltip');
$(this).attr('data-container', 'body');
$(this).attr('title', $(this).html());
}
$(this).html(FormatoNumeroIPP(ToDouble($(this).html()) / Divisor, ((Divisor == 1) ? 2 : 0)));
}
if (ToDouble($(this).html()) < 0) {
$(this).css("color", "red");
}
});
}
function FormatoNumeroIPP(Importe, Decimales) {
if (typeof Decimales === 'undefined') { Decimales = 2; }
if (isNaN(parseInt(Importe))) return "NaN";
var tmpNum = Importe;
tmpNum = tmpNum.toFixed(Decimales).replace(/./g, function (c, i, a) {
return i && c !== "." && !((a.length - i) % 3) ? ',' + c : c;
});
return tmpNum;
}
function pageLoad(sender, e) {
$(document).ready(function () {
$('[data-toggle="tooltip"]').tooltip();
});
}
</script>
</asp:Content>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,973 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSet">
<ConnectionProperties>
<DataProvider>System.Data.DataSet</DataProvider>
<ConnectString>/* Local Connection */</ConnectString>
</ConnectionProperties>
<rd:DataSourceID>bfa7a4ec-5a6b-4054-a660-23ab5ab5944c</rd:DataSourceID>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<DataSourceName>DataSet</DataSourceName>
<CommandText>/* Local Query */</CommandText>
</Query>
<Fields>
<Field Name="codigo">
<DataField>codigo</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="descripcion">
<DataField>descripcion</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="serie">
<DataField>serie</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>DataSet</rd:DataSetName>
<rd:SchemaPath>C:\Users\jesus\Documents\Visual Studio 2015\WebSites\WebSite1\App_Code\DataSet.xsd</rd:SchemaPath>
<rd:TableName>DataTable1</rd:TableName>
<rd:TableAdapterFillMethod />
<rd:TableAdapterGetDataMethod />
<rd:TableAdapterName />
</rd:DataSetInfo>
</DataSet>
</DataSets>
<ReportSections>
<ReportSection>
<Body>
<ReportItems>
<Tablix Name="Tablix1">
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>3.15037cm</Width>
</TablixColumn>
<TablixColumn>
<Width>7.1999cm</Width>
</TablixColumn>
<TablixColumn>
<Width>6.33242cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.61588cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Codigo</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<TopBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox3">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Descripción</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<TopBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox9">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Serie</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox7</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<TopBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.6cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="codigo">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!codigo.Value</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>codigo</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>=IIf(rownumber(nothing) = 1, "1pt", "0pt")</PaddingTop>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="descripcion">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!descripcion.Value</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>descripcion</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>=IIf(rownumber(nothing) = 1, "1pt", "0pt")</PaddingTop>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="serie">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!serie.Value</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>serie</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>=IIf(rownumber(nothing) = 1, "1pt", "0pt")</PaddingTop>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember />
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember />
<TablixMember>
<Group Name="Group1" />
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Left>0.09088cm</Left>
<Height>1.21588cm</Height>
<Width>16.68269cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Tablix>
</ReportItems>
<Height>0.47869in</Height>
<Style />
</Body>
<Width>6.6508in</Width>
<Page>
<PageHeader>
<Height>3.75658cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
<Textbox Name="Textbox2">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!Empresa.Value</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>0.05627cm</Top>
<Left>1.92564cm</Left>
<Height>0.6cm</Height>
<Width>10.95916cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox6">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Fecha:</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox6</rd:DefaultName>
<Top>0.05627cm</Top>
<Left>12.95182cm</Left>
<Height>0.6cm</Height>
<Width>1.33583cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox7">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!Fecha.Value</Value>
<Style>
<Format>dd/MM/yyyy</Format>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox7</rd:DefaultName>
<Top>0.05627cm</Top>
<Left>14.32293cm</Left>
<Height>0.6cm</Height>
<Width>2.5cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox12">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Personal Asignado: </Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Responsable.Value</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox6</rd:DefaultName>
<Top>2.32932cm</Top>
<Left>0.06392cm</Left>
<Height>0.65292cm</Height>
<Width>12.34538cm</Width>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox4">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!Tipo.Value</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>1.64111cm</Top>
<Left>0.06392cm</Left>
<Height>0.65292cm</Height>
<Width>12.34538cm</Width>
<ZIndex>4</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox5">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>0.65762cm</Top>
<Left>1.92564cm</Left>
<Height>0.61364cm</Height>
<Width>10.95916cm</Width>
<ZIndex>5</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</PageHeader>
<PageFooter>
<Height>7.35216cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
<Textbox Name="Textbox31">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>OBSERVACIONES:</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox31</rd:DefaultName>
<Top>0.07054cm</Top>
<Left>0.11166cm</Left>
<Height>0.6cm</Height>
<Width>2.77516cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox32">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!Observaciones.Value</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox31</rd:DefaultName>
<Top>0.10581cm</Top>
<Left>2.9221cm</Left>
<Height>1.2cm</Height>
<Width>13.85147cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Line Name="Line4">
<Top>0.10582cm</Top>
<Left>0.05604cm</Left>
<Height>0cm</Height>
<Width>16.76689cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>Solid</Style>
</Border>
</Style>
</Line>
<Line Name="Line3">
<Top>1.30581cm</Top>
<Left>0.11166cm</Left>
<Height>0cm</Height>
<Width>16.71127cm</Width>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Style>Solid</Style>
</Border>
</Style>
</Line>
<Textbox Name="Textbox26">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!NombreRecibio.Value</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox21</rd:DefaultName>
<Top>1.65887cm</Top>
<Left>0.55741cm</Left>
<Height>0.63528cm</Height>
<Width>7.11779cm</Width>
<ZIndex>4</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox28">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>___________________________________</Value>
<Style />
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Nombre y Firma</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox21</rd:DefaultName>
<Top>2.85338cm</Top>
<Left>0.55115cm</Left>
<Height>0.90367cm</Height>
<Width>7.11779cm</Width>
<ZIndex>5</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox24">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>RECIBIÓ</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox22</rd:DefaultName>
<Top>1.30581cm</Top>
<Left>0.56367cm</Left>
<Height>0.6cm</Height>
<Width>7.11153cm</Width>
<ZIndex>6</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox27">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!NombreEntrego.Value</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox21</rd:DefaultName>
<Top>1.62359cm</Top>
<Left>9.66204cm</Left>
<Height>0.63528cm</Height>
<Width>7.11779cm</Width>
<ZIndex>7</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox29">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>___________________________________</Value>
<Style />
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Nombre y Firma</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox21</rd:DefaultName>
<Top>2.85338cm</Top>
<Left>9.65578cm</Left>
<Height>0.90367cm</Height>
<Width>7.11779cm</Width>
<ZIndex>8</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox25">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>ENTREGÓ</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox22</rd:DefaultName>
<Top>1.30581cm</Top>
<Left>9.66204cm</Left>
<Height>0.6cm</Height>
<Width>7.11779cm</Width>
<ZIndex>9</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox17">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Recibo el equipo arriba relacionado en el entendimiento de que su uso es exclusivamente con fines de trabajo y me comprometo a conservarlo en optimas condiciones de operación y limpieza, devolviendolo al finalizar mi relacion de trabajo o cuando así me lo requiera la empresa. Haciéndome responsable del valor del mismo.</Value>
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>9.5pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox17</rd:DefaultName>
<Top>3.8276cm</Top>
<Left>0.00042cm</Left>
<Height>1.36498cm</Height>
<Width>16.77315cm</Width>
<ZIndex>10</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</PageFooter>
<PageHeight>29.7cm</PageHeight>
<PageWidth>21cm</PageWidth>
<LeftMargin>2cm</LeftMargin>
<RightMargin>2cm</RightMargin>
<TopMargin>2cm</TopMargin>
<BottomMargin>2cm</BottomMargin>
<ColumnSpacing>0.13cm</ColumnSpacing>
<Style />
</Page>
</ReportSection>
</ReportSections>
<ReportParameters>
<ReportParameter Name="Fecha">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Observaciones">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="NombreRecibio">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="NombreEntrego">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Tipo">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Responsable">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Subproyecto">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="SubproyectoDestino">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Folio">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Empresa">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>440354e1-a865-44aa-80f1-3d6c34a46c58</rd:ReportID>
</Report>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -122,13 +122,32 @@ Partial Class General_SaldosIniciales
Exit Sub
End If
If Not dt.Columns(19).ColumnName.ToUpper = "MONEDA PREFERENTE" Then
Alert("El nombre de la columna 20 debe ser 'Moneda Preferente'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
If Not dt.Columns(20).ColumnName.ToUpper = "CLASIFICACIÓN PROVEEDOR" Then
Alert("El nombre de la columna 21 debe ser 'Clasificación Proveedor'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
If Not dt.Columns(21).ColumnName.ToUpper = "REGIMEN FISCAL" Then
Alert("El nombre de la columna 22 debe ser 'CuentaContable'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
If Not dt.Columns(22).ColumnName.ToUpper = "TIPO TERCERO" Then
Alert("El nombre de la columna 23 debe ser 'Tipo Tercero'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
If Not dt.Columns(23).ColumnName.ToUpper = "TIPO OPERACIÓN" Then
Alert("El nombre de la columna 24 debe ser 'Tipo Operación'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
ElseIf RblFormato.SelectedValue = "2" Then
@@ -898,11 +917,6 @@ Partial Class General_SaldosIniciales
Dim Contador As Integer = 0
Dim ExisteProveedor As Boolean = False
If Not dt.Columns.Contains("CveCuentaContable") Then
dt.Columns.Add("CveCuentaContable", GetType(Integer))
End If
@@ -913,6 +927,9 @@ Partial Class General_SaldosIniciales
For Each Row As DataRow In dt.Rows
Dim RazonSocial As String = Row("RazonSocial").ToString
Dim CuentaContable As String = Row("CuentaContable").ToString.Trim.Replace("-", "").Replace(" ", "")
If CuentaContable.Length > 0 Then
@@ -943,16 +960,24 @@ Partial Class General_SaldosIniciales
Exit Sub
End If
Dim DTClasificaciones As New DataTable
Using ObjClasificaciones As New ClsClasificaciones
If ObjClasificaciones.GetClasificaciones(UsuarioActual.CveEmpresa) Then
DTClasificaciones = ObjClasificaciones.DtResultados
End If
End Using
ObjProv.IniciaTransacSQL()
For Each Row As DataRow In dt.Rows
Dim Codigo As String = Row("Codigo").ToString
Dim RazonSocial As String = Row("RazonSocial").ToString
If RazonSocial.Trim.Length = 0 Then
Continue For
End If
Dim RFC As String = Row("RFC").ToString.Trim
Dim Dirrecion As String = $"{ Row("Población").ToString}, { Row("Estado").ToString} , Colonia { Row("Colonia").ToString}, {Row("Calle").ToString} #{Row("Número exterior").ToString}"
@@ -979,25 +1004,127 @@ Partial Class General_SaldosIniciales
Dim CveProveedor As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString.ToEntero
Dim CveProveedor2 As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProveedor", $"RazonSocial = '{RazonSocial}'").ToString.ToEntero
Dim CveProveedor3 As Integer = 0
Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString.ToEntero
Dim TipoProveedor As Integer = If(Row("TipoProveedor").ToString.ToUpper = "PROVEEDOR", 1, 2)
Dim CveConceptoCuentaAsiganaciones As Integer = If(TipoProveedor = 1, 5, 305)
If Codigo.Trim.Length > 0 Then
CveProveedor3 = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProveedor", $"Codigo = '{Codigo}'").ToString.ToEntero
End If
' If CveProveedor > 0 Or CveProveedor2 > 0 Or CveProveedor3 > 0 Then
Dim CodigoRegimenFiscal As String = Row("Regimen Fiscal").ToString
Dim Clasificacion As String = Row("Clasificación Proveedor").ToString
Dim Moneda As String = Row("Moneda Preferente").ToString
Dim DIOTTipoTercero As String = Row("Tipo Tercero").ToString.Trim.ToUpper
Dim DIOTipoOperacion As String = Row("Tipo Operación").ToString
Dim CveMoneda As Integer = -1
Dim CveProveedorClasificacion As Integer = -1
Dim CveRegimenFiscal As Integer = 0
Dim DIOTCveTipoTercero As Integer = 0
Dim DIOTCveTipoOperacion As Integer = 0
If DIOTTipoTercero.Length > 0 Then
Select Case DIOTTipoTercero
Case "PROVEEDOR NACIONAL"
DIOTCveTipoTercero = 1
Exit Select
Case "PROVEEDOR EXTRANJERO"
DIOTCveTipoTercero = 2
Exit Select
Case "ACCIONISTAS, SOCIOS O INTEGRANTES"
DIOTCveTipoTercero = 3
Exit Select
Case "RETENCIONES (EXCEPTO PROVEEDORES)"
DIOTCveTipoTercero = 4
Exit Select
Case "PROVEEDOR NACIONAL GLOBAL"
DIOTCveTipoTercero = 5
Exit Select
Case "PROVEEDOR EXTRANJERO GLOBAL"
DIOTCveTipoTercero = 6
Exit Select
Case "EGRESOS VARIOS"
DIOTCveTipoTercero = 7
Case Else
DIOTCveTipoTercero = 0
Exit Select
End Select
If Not DIOTCveTipoTercero > 0 Then
sbErrores.AppendLine($"Proveedor {RazonSocial} Tipo Tercero {DIOTTipoTercero} invalida.<br>")
ErrorProv = True
End If
End If
If DIOTipoOperacion.Length > 0 Then
Select Case DIOTipoOperacion
Case "03", "3"
DIOTCveTipoOperacion = 1
Exit Select
Case "06", "6"
DIOTCveTipoOperacion = 2
Exit Select
Case "85"
DIOTCveTipoOperacion = 3
Exit Select
Case Else
DIOTCveTipoOperacion = 0
Exit Select
End Select
If Not DIOTCveTipoOperacion > 0 Then
sbErrores.AppendLine($"Proveedor {RazonSocial} Tipo Operación {DIOTipoOperacion} invalida.<br>")
ErrorProv = True
End If
End If
If Moneda.ToUpper.Contiene("PESOS", "PESO", "MXN", "MONEDA NACIONAL") Then
CveMoneda = 1
ElseIf Moneda.ToUpper.Contiene("DOLARES", "DOLAR", "USD", "DÓLARES") Then
CveMoneda = 2
Else
sbErrores.AppendLine($"Proveedor {RazonSocial} Moneda {Moneda} invalida.<br>")
ErrorProv = True
End If
If Clasificacion.Trim.Length > 0 Then
CveProveedorClasificacion = DTClasificaciones.FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString.ToEntero
If Not CveProveedorClasificacion > 0 Then
sbErrores.AppendLine($"Proveedor {RazonSocial} Clasificación {Clasificacion} invalida.<br>")
ErrorProv = True
End If
End If
If CodigoRegimenFiscal.Trim.Length > 0 Then
CveRegimenFiscal = GlobalDTRegimenesFiscales.FiltroPrimeroValor("CveRegimenFiscal", $"CodigoRegimenFiscal= '{CodigoRegimenFiscal}' ").ToEntero
If Not CveRegimenFiscal > 0 Then
sbErrores.AppendLine($"Proveedor {RazonSocial} Codigo RegimenFiscal {CodigoRegimenFiscal} invalido.<br>")
ErrorProv = True
End If
End If
If ErrorProv Then
Alert($"Errores detectados <br>{sbErrores.ToString()}", TipoMensaje.MsgAdvertencia)
Exit For
End If
If CveProveedor > 0 Or CveProveedor2 > 0 Or CveProveedor3 > 0 Then
Contador = Contador + 1
'If Not ObjProv.UpdateProveedor(Codigo, RazonSocial, RazonSocial, RazonSocial, RFC, Calle, Telefono,
' Contacto, "", Telefono, LimiteCredito, PlazoCobranza, "", 0, 0, 0, -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "",
' -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, -1, True, "", "", False, CveProveedor) Then
@@ -1013,15 +1140,19 @@ Partial Class General_SaldosIniciales
Telefono = If(Telefono.Length > 10, "", Telefono)
CelularContacto = If(CelularContacto.Length > 10, "", Telefono)
If Not ObjProv.AddProveedor(Codigo, RazonSocial, RazonSocial, RazonSocial, RFC, Dirrecion, Telefono,
"", ContactoMail, CelularContacto, LimiteCredito, PlazoCobranza, "", 0, 0, 0, -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "",
-1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, -1, "", "", False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CP:=CodigoPostal, CveRegimenFiscal:=0, CveTipoProveedor:=TipoProveedor) Then
If Not ObjProv.AddProveedor(Codigo, RazonSocial, RazonSocial, RazonSocial, RFC, Dirrecion, Telefono, "", ContactoMail, CelularContacto, LimiteCredito, PlazoCobranza, "",
0, 0, 0, -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "",
-1, "", -1, "", -1, "", CveProveedorClasificacion, -1, "", "", False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CP:=CodigoPostal, CveRegimenFiscal:=CveRegimenFiscal,
CveTipoProveedor:=TipoProveedor, CveMonedaPreferente:=CveMoneda, DIOTCveTipoTercero:=DIOTCveTipoTercero, DIOTCveTipoOperacion:=DIOTCveTipoOperacion) Then
ErrorProv = True
Exit For
Else
Dim ErrorCuentaDeposito As Boolean = False
'RESTRICCIONES GENERALES
'QUE TENGA ALGUN DATO DE TIPO DE CUENTA

View File

@@ -80,7 +80,6 @@
</asp:UpdatePanel>
</td>
<td>
</td>
</tr>
@@ -94,11 +93,10 @@
<tr align="left" runat="server" id="TrCompuesto" visible="false">
<td class="text-right"><b>Compuesto:</b></td>
<td>
<asp:TextBox ID="TxtCompuesto" AutoPostBack="True" runat="server" CssClass="form-control input-sm select2me" Width="400px"></asp:TextBox>
<asp:TextBox ID="TxtCompuesto" runat="server" CssClass="form-control input-sm select2me" Width="400px"></asp:TextBox>
</td>
<td></td>
</tr>
<tr>
<td colspan="4" style="text-align: center;">
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" class="btn btn-primary" />

View File

@@ -185,14 +185,12 @@
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<div class="row col-md-12" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<br />
<asp:UpdatePanel ID="UpEncabezado" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="dvCa" style="width:100%;visibility:hidden;top:40px">

View File

@@ -8,7 +8,6 @@ Imports Newtonsoft.Json
Partial Class OC_OC
Inherits ClsPaginas
Private Shared missing As Object = System.Reflection.Missing.Value
#Region "Propiedades"
Private Property CveEmpresaActual As Integer

View File

@@ -143,7 +143,7 @@ Partial Class CatSubProyectos
Private Sub CargaSegmentosNegocio()
DdlSegmentoNegocio.Items.Clear()
If UsuarioActual.Empresa.UsaContabilidad Then
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
Dim Cuenta As New ClsContPAQi(UsuarioActual.Empresa)
@@ -962,15 +962,17 @@ Partial Class CatSubProyectos
Dim SubProyecto As String = GvRow.DataKey("SubProyecto")
Dim Erroreliminacion As Boolean = False
Dim ObjUsuarios As New ClsSisUsuarios
Dim ObjGenerales As New ClsGenerales
Dim ObjUsuarios As New ClsSisUsuarios()
Dim ObjGenerales As New ClsGenerales(ObjUsuarios.IniciaTransacSQL)
If ObjUsuarios.RemoveSubProyectos(CveUsuario, CveSubProyectoUsuarios, UsuarioActual.CveUsuario) Then
If Not ObjGenerales.AddHistorialBitacora(406, -1, -1, -1, -1, -1, -1, -1, "", SubProyecto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "-1", "-1", "-1", CveUsuarioTabla:=CveUsuario) Then
Erroreliminacion = True
ObjUsuarios.Commit()
End If
Else
Erroreliminacion = True
ObjUsuarios.RollBack()
End If
ObjUsuarios.Dispose()

View File

@@ -8974,15 +8974,15 @@ Partial Class Ventas
EsValido = True
End If
If UsuarioActual.Empresa.Funcionalidad(133).ToEntero() > 0 AndAlso UsuarioActual.CveUsuario <> 1560 Then
CostoMayor = Costo + ((UsuarioActual.Empresa.Funcionalidad(133).ToDecimal / 100) * Costo)
'SI EL PRECIO ES MAYOR AL COSTO, SI PASA
If PU <= CostoMayor Then
EsValidoMayor = True
End If
Else
EsValidoMayor = True
End If
'If UsuarioActual.Empresa.Funcionalidad(133).ToEntero() > 0 AndAlso UsuarioActual.CveUsuario <> 1560 Then
' CostoMayor = Costo + ((UsuarioActual.Empresa.Funcionalidad(133).ToDecimal / 100) * Costo)
' 'SI EL PRECIO ES MAYOR AL COSTO, SI PASA
' If PU <= CostoMayor Then
' EsValidoMayor = True
' End If
'Else
' EsValidoMayor = True
'End If
'VALIDA PROMOCION: SI TIENE PROMOCION Y EL PRECIO ES MENOR AL PRECIO DE PROMOCION, NO PASA | SI YA CUMPLE NO VUELVE A VALIDAR
If Not EsValido Or PU = 0 Then
@@ -8998,24 +8998,24 @@ Partial Class Ventas
End If
'NO DEJA REGISTRAR CON VALIDACION DE COSTO ALMACEN O PROMOCION
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
If Not EsValido Then
'If Not EsValido Then
MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio menor de su Costo ni a un precio mayor de su rango aceptado<br/>", dr("PS").ToString())
If TienePermisoImportes Then
MensajeCosto.AppendFormat("El costo del producto es: <b>{0:#,###.00}$</b> <br/>", Costo)
MensajeCosto.AppendFormat("El rango menor aceptado es: {0} <b>{1:#,###.00}$</b> <br/>", UsuarioActual.Empresa.Funcionalidad(129).ToEntero(), CostoMenor)
MensajeCosto.AppendFormat("El precio indicado es: <b>{0:#,###.00}$</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, If(Costo > 0, ((PU - Costo) * 100) / Costo, 0))
End If
End If
' MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio menor de su Costo ni a un precio mayor de su rango aceptado<br/>", dr("PS").ToString())
' If TienePermisoImportes Then
' MensajeCosto.AppendFormat("El costo del producto es: <b>{0:#,###.00}$</b> <br/>", Costo)
' MensajeCosto.AppendFormat("El rango menor aceptado es: {0} <b>{1:#,###.00}$</b> <br/>", UsuarioActual.Empresa.Funcionalidad(129).ToEntero(), CostoMenor)
' MensajeCosto.AppendFormat("El precio indicado es: <b>{0:#,###.00}$</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, If(Costo > 0, ((PU - Costo) * 100) / Costo, 0))
' End If
'End If
If Not EsValidoMayor Then
MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio mayor de su rango aceptado<br/>", dr("PS").ToString())
If TienePermisoImportes Then
MensajeCosto.AppendFormat("El costo del producto es: <b>{0:#,###.00}$</b> <br/>", Costo)
MensajeCosto.AppendFormat("El rango mayor aceptado es: {0} <b>{1:#,###.00}$</b> <br/>", UsuarioActual.Empresa.Funcionalidad(133).ToEntero(), CostoMayor)
MensajeCosto.AppendFormat("El precio indicado es: <b>{0:#,###.00}$</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, If(Costo > 0, ((PU - Costo) * 100) / Costo, 0))
End If
End If
'If Not EsValidoMayor Then
' MensajeCosto.AppendFormat("El Producto <b>{0}</b>. No se puede vender a un precio mayor de su rango aceptado<br/>", dr("PS").ToString())
' If TienePermisoImportes Then
' MensajeCosto.AppendFormat("El costo del producto es: <b>{0:#,###.00}$</b> <br/>", Costo)
' MensajeCosto.AppendFormat("El rango mayor aceptado es: {0} <b>{1:#,###.00}$</b> <br/>", UsuarioActual.Empresa.Funcionalidad(133).ToEntero(), CostoMayor)
' MensajeCosto.AppendFormat("El precio indicado es: <b>{0:#,###.00}$</b> ({1}% de ganancia) <br/>", PU.FormatoNumero, If(Costo > 0, ((PU - Costo) * 100) / Costo, 0))
' End If
'End If
' SOLO SI TIENE LA FUNCIONALIDAD DE RESTRICCION VALIDA EL IMPORTE CERO
If UsuarioActual.Empresa.Funcionalidad(139).ToString().ToEntero() > 0 Then
@@ -15776,47 +15776,8 @@ Partial Class Ventas
For Each gvr As GridViewRow In GVAnticipos.Rows
If gvr.FCCheckBox("Chk" & gvr.RowIndex).Checked Then
Dim FechaUltimaFluctuacion As Date = MinFecha
Dim TipoCambioFluctuacion As Decimal = 1
Dim tFecha As Date = Now
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
If UltimaFluctuacion.FechaFluctuacion <= tFecha Then
FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion
TipoCambioFluctuacion = UltimaFluctuacion.TCFluctuacion
End If
End If
If DdlMoneda.SelectedValue.ToEntero() = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero() = 1 Then 'SI LA VENTA VIENE EN PESOS Y SE VA A PAGAR EN PESOS
tipoCambioPago = 1
tipoCambioVenta = 1
tipoCambioVentaValuacion = 1
PorcentajePago = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("Original").ToDecimal
ElseIf DdlMoneda.SelectedValue.ToEntero() = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero() = 1 Then 'SI LA VENTA VIENE EN DOLARES Y SE VA A PAGAR EN PESOS
tipoCambioPago = gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
tipoCambioVenta = TxtTipoCambio.Text.ToDecimal
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.ToDecimal)
PorcentajePago = (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal) / gvr.DataKey("Original").ToDecimal
ElseIf DdlMoneda.SelectedValue.ToEntero() = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero() = 2 Then 'SI LA VENTA VIENE EN DOLARES Y SE VA A PAGAR EN DOLARES
tipoCambioPago = gvr.DataKey("TipoCambio").ToString().ToDecimal
tipoCambioVenta = TxtTipoCambio.Text.ToDecimal
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.ToDecimal)
PorcentajePago = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("Original").ToDecimal
ElseIf DdlMoneda.SelectedValue.ToEntero() = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero() = 2 Then 'SI LA VENTA VIENE EN PESOS Y SE VA A PAGAR EN DOLARES
tipoCambioPago = gvr.DataKey("TipoCambioHoy").ToDecimal() ' gvr.FCTextBox("TxtTC" & gvr.RowIndex).Text.ToDecimal
tipoCambioVenta = 1
tipoCambioVentaValuacion = If(TxtFecha.Text.ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, TxtTipoCambio.Text.ToDecimal)
PorcentajePago = (gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal) / gvr.DataKey("Original").ToDecimal
End If
Dim importeMovimiento As Decimal = 0
Dim importeMN As Decimal = 0
Dim TC As Decimal
Dim IdCtaContable As Integer
Dim TipoMovimiento As Boolean = True
Dim Concepto As String = VentaActual.SerieFolio
@@ -15886,81 +15847,22 @@ Partial Class Ventas
If gvr.DataKey("CveIE").ToEntero() > 0 Then
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
IdCtaContable = IdCtaContClientes
If importeMovimiento <> 0 Then
Dim Pago As New VentaPago
Pago.ImportePagoVenta = importeMovimiento
Pago.ImportePago = importeMovimiento
Pago.CveIE = CveIEAnticipo
Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero()
Pago.TipoPago = "A"
Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal
Pago.TipoPago = "I"
Pago.FechaDocumentoRelacionado = gvr.DataKey("Fecha").ToDate
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
Pago.Referencia = gvr.DataKey("Folio")
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
' Agregamos el 2
If tipoCambioPago = 1 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContClientes, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True
End If
Else 'Cuando son dolares
If importeMovimiento <> 0 Then
If IdCtaContComplementaria > 0 Or 0 > 0 Then
'Agregamos la Complementaria
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, 0, Concepto, 207, Concepto, Now, IdCtaContComplementaria, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True
End If
'Agregamos la Extranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True
End If
Else
'Agregamos la Extranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True
End If
End If
End If
End If
importeMovimiento = ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / TxtTotal.Text.ToDecimal) * TxtIVA.Text.ToDecimal)
importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
'Agregamos el 92
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal 'gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo" & gvr.RowIndex).ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
IdCtaContable = IdCtaContAnticipos
If ObjCliente.GetClientes(gvr.DataKey("CveCliente").ToEntero(), "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
If Not tipoCambioPago = 1 Then
IdCtaContable = ObjCliente.IdCtaMonedaExtranjeraAnticipos
Else
IdCtaContable = ObjCliente.IdCtaContAnticipos
End If
End If
End If
If UsuarioActual.CveEmpresa.Contiene(119) Then
If gvr.DataKey("Fecha").ToDate.Year <= 2017 AndAlso TxtFechaAnticipoCliente.Text.ToDate.Year >= 2018 Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
If Not tipoCambioPago = 1 Then
IdCtaContable = ObjCliente.IdCtaContMonedaExtranjera
Else
IdCtaContable = ObjCliente.IdCtaContClientes
End If
End If
End If
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, 555, Concepto, Now, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMN, CveCuenta:=-1, TipoCambio:=tipoCambioPago, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True
End If
End If
End If
End Select