This commit is contained in:
2022-10-19 16:13:53 -07:00
21 changed files with 3499 additions and 3355 deletions

View File

@@ -4157,6 +4157,7 @@ Public Class ClsContabilidad
DataAdapter("PA_Sis_InconsistenciasGet")
Try
SqlAdapter.SelectCommand.CommandTimeout = 0
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception

View File

@@ -1781,6 +1781,7 @@ Public Class ClsInventarios
End With
Try
SqlAdapter.SelectCommand.CommandTimeout = 0
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception

View File

@@ -536,7 +536,7 @@ Partial Class Bancos_RepIE
Private Sub Imprimir(Formato As String)
Dim LogoRutaFisica As String = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
'Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
Dim params As New List(Of ReportParameter)
@@ -551,7 +551,7 @@ Partial Class Bancos_RepIE
params.Add(New ReportParameter("CajaChica", ParametrosReporte))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If

View File

@@ -4069,7 +4069,7 @@
</div>
</asp:Panel>
<asp:Panel ID="PnlContadoDeudores" Width="84%" Style="position: relative; margin: auto" runat="server" Visible="False">
<asp:Panel ID="PnlContadoDeudores" Width="100%" Style="position: relative; margin: auto" runat="server" Visible="False">
<asp:RadioButtonList ID="RBLTipoDeudor" runat="server" RepeatDirection="Horizontal" AutoPostBack="true">
<asp:ListItem Value="1" Selected="True">D.D</asp:ListItem>
@@ -4098,7 +4098,8 @@
<div class="col-md-12">
<asp:UpdatePanel ID="UPDeudores" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDeudores" runat="server" AutoGenerateColumns="False" CssClass="ScrollAD" data-heigth="200px" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,CveMoneda"
<asp:GridView ID="GvDeudores" runat="server" AutoGenerateColumns="False" CssClass="ScrollAD" data-heigth="200px" EmptyDataText="No se encontraron movimientos"
DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,CveMoneda"
ToolTip="Listado de Movimientos" data-height="300" Style="width: 100%; height: 100%; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
@@ -4143,6 +4144,15 @@
<ajax:ValidatorCalloutExtender ID="VCOAmortAnti" runat="server" HighlightCssClass="vco" TargetControlID="CVAmortAnti" Width="300px"></ajax:ValidatorCalloutExtender>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Otros<br/>Gastos/Ingresos
</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtOtrosGastosIngresos" runat="server" Style="text-align: right;" CausesValidation="true" Enabled="false" MaxLength="12" Width="76px" onblur="FnSumOtrosIngEgs(this)" ></asp:TextBox>
<ajax:FilteredTextBoxExtender TargetControlID="TxtOtrosGastosIngresos" ValidChars="1234567890.-" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<%--<RowStyle CssClass="TextoAlterno" />
<AlternatingRowStyle CssClass="TextoAlterno" />
@@ -4158,16 +4168,20 @@
</div>
<div class="chequesie1">
<div class="row">
<label class="col-md-2"></label>
<label class="col-md-1"></label>
<div class="col-md-4"></div>
<label class="col-md-2">Importe</label>
<div class="col-md-4 input-icon">
<div class="col-md-2 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtContadoDeudor" runat="server" CssClass="form-control input-sm" MaxLength="12" Width="80px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FEContadoDeudor" runat="server" TargetControlID="TxtContadoDeudor" FilterType="Custom, Numbers" ValidChars=".," />
<asp:RangeValidator ID="RVContadoDeudor" runat="server" Type="Currency" MinimumValue="0" MaximumValue="0" ErrorMessage="Importe Excedido del Saldo del Deudor" ControlToValidate="TxtContadoDeudor" Display="None" ValidationGroup="GrpContado"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCEContadoDeudor" runat="server" HighlightCssClass="vco" TargetControlID="RVContadoDeudor" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-2 input-icon">
<asp:TextBox ID="TxtDeudoresOtrosGastosIngresos" runat="server" CssClass="form-control input-sm" MaxLength="12" Width="80px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilTxtDeudoresOtrosGastosIngresos" runat="server" TargetControlID="TxtDeudoresOtrosGastosIngresos" FilterType="Custom, Numbers" ValidChars=".," />
</div>
</div>
</div>
</asp:Panel>
@@ -5567,13 +5581,14 @@
});
}
function ClickDeudorChk(Chk, Obj, total, saldo) {
function ClickDeudorChk(Chk, Obj, total, saldo,txtOtrIngEgs) {
debugger;
total = parseFloat(parseFloat(total).toFixed(2));
saldo = parseFloat(parseFloat(saldo).toFixed(2));
if ($("#" + Chk.id).is(":checked")) {
$('#' + Obj).attr('disabled', false);
$('#' + txtOtrIngEgs).attr('disabled', false);
if (parseFloat($get('TxtContadoDeudor').value) != total) {
@@ -5603,15 +5618,14 @@
}
}
else {
$('#' + Obj).val(0);
}
}
else {
$('#' + Obj).attr('disabled', true);
$('#' + txtOtrIngEgs).attr('disabled', true);
if (parseFloat($get(Obj).value) > 0) {
$get('TxtContadoDeudor').value = parseFloat(parseFloat($get('TxtContadoDeudor').value) - parseFloat($get(Obj).value)).toFixed(2);
if ($get('TxtContadoDeudor').value < 0) {
@@ -5619,6 +5633,8 @@
}
}
$('#' + Obj).val(0);
$('#' + txtOtrIngEgs).val(0);
$('#TxtDeudoresOtrosGastosIngresos').val('0');
}
if (parseFloat($('#TxtContadoDeudor').val()) == total) {
@@ -6765,6 +6781,11 @@
}
function FnSumOtrosIngEgs(txtOtrIngEgs) {
$('#TxtDeudoresOtrosGastosIngresos').val(txtOtrIngEgs.value);
}
</script>
</asp:Content>

View File

@@ -5801,9 +5801,11 @@ Partial Class Compras_Compras
'Deudores (37)
Dim importeDD As Decimal = 0
Dim OtrosGastosIngresos As Decimal = 0
If CveIE > 0 AndAlso RBLPago.SelectedValue.ToEntero = 2 AndAlso RBLContado.SelectedValue = "4" Then
ConceptoPersonal = DdlDeudor.SelectedItem.ToString
importeDD = TxtContadoDeudor.Text.ToDecimal
OtrosGastosIngresos = TxtDeudoresOtrosGastosIngresos.Text.ToDecimal
sumaPagos += importeDD
End If
@@ -5987,10 +5989,15 @@ Partial Class Compras_Compras
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, importeMN, 41, Referencia, Concepto, CtaProveedorAcreedores, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
If importeMovimiento <> 0 Then
Dim Pago As New CompraPago
Pago.ImportePago = importeMovimiento
@@ -5998,6 +6005,7 @@ Partial Class Compras_Compras
Pago.CveMonedaPago = 1
Pago.CveCompraAmortizacion = -1
Pago.CveCreditoDetalle = CveCreditoDetalle
'Pago.OtroGastoIngreso = OtrosGastosIngresos
ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
@@ -6938,47 +6946,123 @@ Partial Class Compras_Compras
End If
Case 37 'Deudores
If RBLTipoDeudor.SelectedValue.ToEntero = 1 Then
For Each rw As GridViewRow In GvDeudores.Rows
If rw.FCCheckBox("Chk").Checked Then
importeMovimiento = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
IdCtaContable = CtaProveedorDeudores
Dim tCveProveedor As Integer = rw.DataKey("CveProveedor").ToEntero
'Conta ContPAQ
Dim CveConceptoContableDeoudor As Integer = If(RBLTipoDeudor.SelectedValue.ToEntero = 1, 37, 254)
For Each rw As GridViewRow In GvDeudores.Rows
If rw.FCCheckBox("Chk").Checked Then
importeMovimiento = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
OtrosGastosIngresos = rw.FCTextBox("TxtOtrosGastosIngresos").Text.ToDecimal
importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
Dim OtrosGastosIngresosMN As Decimal = (OtrosGastosIngresos * tipoCambioActual * Multiplicador).RoundSQL
Dim importeMNOtrosIngEgs As Decimal = ((importeMovimiento + OtrosGastosIngresos) * tipoCambioActual * Multiplicador).RoundSQL
IdCtaContable = CtaProveedorDeudores
Dim tCveProveedor As Integer = rw.DataKey("CveProveedor").ToEntero
'Conta ContPAQ
If CveConceptoContableDeoudor = 37 Then
If IdCtaContable = 0 Then
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", CveConceptoContableDeoudor))("ConceptoContable").ToString)
idCuentaContabilizacion = 0
End If
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
If OtrosGastosIngresos = 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, CveConceptoContableDeoudor, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, 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
End If
Else
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
importeMovimiento = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
IdCtaContable = CtaProveedorDeudores
Dim tCveProveedor As Integer = rw.DataKey("CveProveedor").ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 254, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, 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
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, (importeMovimiento + OtrosGastosIngresos), Referencia, CveConceptoContableDeoudor, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNOtrosIngEgs, ImporteME:=If(tipoCambioActual = 1, 0, (importeMovimiento + OtrosGastosIngresos)), Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True : Exit For
End If
Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE, .CveMonedaPago = rw.DataKey("CveMoneda").ToEntero}
AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
End If
Next
End If
Dim Pago As New CompraPago With {
.ImportePago = importeMovimiento,
.CveIE = CveIE,
.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero,
.OtroGastoIngreso = OtrosGastosIngresos
}
AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
End If
Next
'If RBLTipoDeudor.SelectedValue.ToEntero = 1 Then
' For Each rw As GridViewRow In GvDeudores.Rows
' If rw.FCCheckBox("Chk").Checked Then
' importeMovimiento = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
' OtrosGastosIngresos = rw.FCTextBox("TxtDeudoresOtrosGastosIngresos").Text.ToDecimal
' importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
' Dim OtrosGastosIngresosMN As Decimal = (OtrosGastosIngresos * tipoCambioActual * Multiplicador).RoundSQL
' IdCtaContable = CtaProveedorDeudores
' Dim tCveProveedor As Integer = rw.DataKey("CveProveedor").ToEntero
' 'Conta ContPAQ
' If IdCtaContable = 0 Then
' CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
' idCuentaContabilizacion = 0
' End If
' If OtrosGastosIngresos = 0 Then
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, 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
' End If
' Else
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, (importeMovimiento + OtrosGastosIngresos), Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, 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
' End If
' End If
' 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
' importeMovimiento = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
' OtrosGastosIngresos = rw.FCTextBox("TxtDeudoresOtrosGastosIngresos").Text.ToDecimal
' importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
' Dim OtrosGastosIngresosMN As Decimal = (OtrosGastosIngresos * tipoCambioActual * Multiplicador).RoundSQL
' IdCtaContable = CtaProveedorDeudores
' Dim tCveProveedor As Integer = rw.DataKey("CveProveedor").ToEntero
' If OtrosGastosIngresos = 0 Then
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 254, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, 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
' End If
' Else
' adasdasdasd
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, (importeMovimiento + OtrosGastosIngresos), Referencia, 254, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=tCveProveedor, 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
' End If
' End If
' Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE, .CveMonedaPago = rw.DataKey("CveMoneda").ToEntero}
' AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
' End If
' Next
'End If
importeMovimiento = 0
OtrosGastosIngresos = 0
Case 41 'Acreedores
importeMovimiento = importeAcreedores
@@ -8484,8 +8568,6 @@ Partial Class Compras_Compras
Next
If ErrorMovtosCxP = 0 And CvePrePolizaNueva > 0 Then
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IdPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
@@ -8494,7 +8576,7 @@ Partial Class Compras_Compras
ObjContaAC.IniciaTransacSQL()
End If
If Not ObjConta.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveEmpresa, UsuarioActual.Empresa, MinFecha, "", ObjContaAC) Then
If Not ObjConta.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa, MinFecha, "", ObjContaAC) Then
ErrorMovtosCxP = 3
End If
@@ -10169,7 +10251,7 @@ Partial Class Compras_Compras
Dim total As Double = TxtTotal.Text.ToString.ToDouble
Dim saldo As Double = e.Row.DataKey("Saldo").ToDouble
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo))
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"",""{3}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo, e.Row.FCTextBox("TxtOtrosGastosIngresos").ClientID))
e.Row.FCTextBox("TxtSaldoDeudor").Attributes.Add("onKeyUp", String.Format("AjustaTextboxDeudores(this);"))
Dim rv As RangeValidator = CType(e.Row.FindControl("RVSaldoDeudor"), RangeValidator)
@@ -10713,6 +10795,9 @@ Partial Class Compras_Compras
End Sub
Protected Sub GVINV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvInv.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
'SI USA SERIE-LOTE INVENTARIO
@@ -10888,6 +10973,20 @@ Partial Class Compras_Compras
''CARGA ALMACEN CONSIGNACION
e.Row.FCDropDownList("ddlAlmacenConsignacionGeneral").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 4)
e.Row.FCDropDownList("ddlAlmacenConsignacionGeneral").DataBind()
If UsuarioActual.Empresa.Funcionalidad(567) = "1" Then
If e.Row.FCDropDownList("ddlAlmacen").Items.Count > 1 Then
e.Row.FCDropDownList("ddlAlmacen").SelectedIndex = 1
e.Row.FCCheckBox("cbAll").Checked = True
cbAll_CheckedChanged(e.Row.FCCheckBox("cbAll"), Nothing)
ddlAlmacen_SelectedIndexChanged(e.Row.FCDropDownList("ddlAlmacen"), Nothing)
End If
End If
End If
End Sub

View File

@@ -673,10 +673,14 @@
</div>
<div class="modal-body">
<div class="row" runat="server" id="DivVincularPagoManualmente" style="visibility:hidden!important">
<div class="row" runat="server" id="DivVincularPagoManualmente" style="display:none!important">
<div class="col-md-2">
<a runat="server" class="btn btn-circle btn-default" href="javascript:AbrirVentana('/Bancos/PopUpBuscarIE.aspx?OPCION=Complementos',800,600,'N');"><i class='fa fa-plus'></i>Vincular IE Manualmente</a>
<asp:Button ID="BtnVincularManualmente" runat="server" ClientIDMode="Static" OnClick="BtnVincularManualmente_Click" Style="display: none;" class="btn btn-primary" />
<a runat="server" class="btn btn-circle btn-default" href="javascript:AbrirVentana('/Bancos/PopUpBuscarIE.aspx?OPCION=Complementos',800,600,'N');">
<i class='fa fa-plus'></i>Vincular IE Manualmente
</a>
<asp:Button ID="BtnVincularManualmente" runat="server" ClientIDMode="Static" OnClick="BtnVincularManualmente_Click" class="btn btn-primary" Text="bincular manualmente" />
<asp:HiddenField runat="server" ID="HdnCveIE" ClientIDMode="Static" Value="-1" />
<asp:HiddenField runat="server" ID="HdnIdDocumento" ClientIDMode="Static" Value="-1" />
</div>
@@ -1292,10 +1296,7 @@
$('#BtnVincularManualmente').click();
}
function CargaVinculacionTraslado(CveCompra, FolioCompra) {
function CargaVinculacionTraslado(CveCompra, FolioCompra) {
$('#HdnCveCompraComplementoTraslado').val(CveCompra);
$('#HdnFolioCompraComplementoTraslado').val(FolioCompra ) ;
$('#BtnCargaCompraComplementoTraslado').click();

View File

@@ -3514,11 +3514,11 @@ Partial Class Compras_eFacturas
BtnVincularPago.Visible = False
If DTDocumentosRelacionados.Rows.Count > 0 Then
SerieFolioIE = DTDocumentosRelacionados.Rows(0)("SerieFolio").ToString
DivVincularPagoManualmente.Visible = False
'DivVincularPagoManualmente.Visible = False
BtnVincularPago.Visible = True
TieneRegistros = True
Else
DivVincularPagoManualmente.Visible = True
'DivVincularPagoManualmente.Visible = True
BtnVincularPago.Visible = False
End If
@@ -3614,7 +3614,7 @@ Partial Class Compras_eFacturas
If Not (FechaDoRecibo >= FT1 And FechaDoRecibo < FT2) Then
If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then
DivVincularPagoManualmente.Visible = True
'DivVincularPagoManualmente.Visible = True
End If
MSGComplemento = MSGComplemento & " Existen mas de 3 días de diferencia entre la fecha del documento y la fecha de complemento. "
@@ -3650,7 +3650,7 @@ Partial Class Compras_eFacturas
MSGComplemento = MSGComplemento & $" Existe una diferencia mayor a $5.00 ({Math.Abs(DiferenciaImportes).ToString("###,###,###.00")})"
If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then
DivVincularPagoManualmente.Visible = True
'DivVincularPagoManualmente.Visible = True
End If
End If
Else
@@ -3658,13 +3658,13 @@ Partial Class Compras_eFacturas
BtnVincularPago.Visible = False
MSGComplemento = MSGComplemento & $" No se encontraron pagos "
If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then
DivVincularPagoManualmente.Visible = True
' DivVincularPagoManualmente.Visible = True
End If
End If
Else
BtnVincularPago.Visible = False
MSGComplemento = MSGComplemento & $"No se encontraron compras relacionadas"
DivVincularPagoManualmente.Visible = False
'DivVincularPagoManualmente.Visible = False
End If
@@ -3697,7 +3697,7 @@ Partial Class Compras_eFacturas
Else
LblMensajeComlementoError.Text = ""
DVMensajecomplementoError.Visible = False
DivVincularPagoManualmente.Visible = False
' DivVincularPagoManualmente.Visible = False
End If
@@ -3708,18 +3708,18 @@ Partial Class Compras_eFacturas
ListaComprasPUE = ListaComprasPUEInterna
If DivVincularPagoManualmente.Visible Then
'If DivVincularPagoManualmente.Visible Then
For Each GvRowValidaCompra As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
If GvRowValidaCompra.DataKey("CveCompra").ToEntero > 0 Then
DivVincularPagoManualmente.Visible = True
Exit For
Else
DivVincularPagoManualmente.Visible = False
End If
Next
' For Each GvRowValidaCompra As GridViewRow In GVPDocumentosRelacionadosPagos.Rows
' If GvRowValidaCompra.DataKey("CveCompra").ToEntero > 0 Then
' DivVincularPagoManualmente.Visible = True
' Exit For
' Else
' DivVincularPagoManualmente.Visible = False
' End If
' Next
End If
'End If
BtnVincularPago.Attributes.Add("data-toggle", "")
BtnVincularPago.Attributes.Add("data-popout", "")

View File

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

View File

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

View File

@@ -719,7 +719,7 @@ Partial Class RepCxC
If DtDatos.Rows(0)("TC9").ToString.ToEntero = 1 Or DtDatos.Rows(0)("TC9").ToString.ToEntero = 2 Then CantidadColumnas += 1
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 logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim params As New List(Of ReportParameter)
@@ -734,7 +734,7 @@ Partial Class RepCxC
params.Add(New ReportParameter("CantColumnas", CantidadColumnas.ToString))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1541,9 +1541,6 @@ Partial Class General_SaldosIniciales
FechaVencimiento = Fecha
End If
'Compra
If Not ObjCompras.AddCompra(TipoDocto, "", Serie, Folio, Folio2, CveProveedor.ToEntero, SubTotal, 0, 0, IVA, RetIVA, RetISR, IEPS, 0, 0, Total, Fecha, CveMoneda, TipoCambio.ToDouble, FechaVencimiento,
False, CodProvee, 1, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorSucursal:=CveProveedorSucursal,
@@ -1573,8 +1570,8 @@ Partial Class General_SaldosIniciales
If IEPS > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IEPS, Folio, 25, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=IEPS, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For
If RetIVA > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, Folio, 15, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=RetIVA, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For
If RetISR > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetISR, Folio, 16, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=RetISR, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For
If RetIVA > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, RetIVA, Folio, 15, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=RetIVA, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For
If RetISR > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, RetISR, Folio, 16, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=RetISR, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For
If ImpuestosLocales > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImpuestosLocales, Folio, 27, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=ImpuestosLocales, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For
'Saldo
@@ -1814,8 +1811,6 @@ Partial Class General_SaldosIniciales
If Not dt.Columns.Contains("CveCuentaContable") Then
dt.Columns.Add("CveCuentaContable", GetType(Integer))
End If
Dim sbErrores As New StringBuilder
For Each Row As DataRow In dt.Rows
@@ -1837,8 +1832,6 @@ Partial Class General_SaldosIniciales
End If
Next
If Not ErrorAF Then
dt.AcceptChanges()
Else
@@ -1846,7 +1839,6 @@ Partial Class General_SaldosIniciales
Exit Sub
End If
Dim ObjAF As New ClsAF
Try
@@ -1855,13 +1847,13 @@ Partial Class General_SaldosIniciales
Dim Contador As Integer = 0
Dim NumRow As Integer = 0
For Each Row As DataRow In dt.Rows
For Each Row As DataRow In dt.FiltraParametros("Descripción <> ''").Rows
Dim Codigo As String = Row("Código").ToString
Dim Descripcion As String = Row("Descripción").ToString
Dim TipoAF As String = Row("Tipo").ToString
Dim SubTipo As String = Row("SubTipo").ToString
Dim Valor As Decimal = Row("Valor").ToString.ToDecimal
Dim FechaAF As Date = Row("Fecha").ToString.ToDate
Dim TipoAF As String = Row("Tipo").ToString.Trim
Dim SubTipo As String = Row("SubTipo").ToString.Trim
Dim Valor As Decimal = Row("Valor de compra").ToString.ToDecimal
Dim FechaAF As Date = Row("Fecha de compra").ToString.ToDate
Dim NumeroSerie As String = Row("No. Serie").ToString
Dim Año As Integer = Row("Año").ToString.ToEntero
Dim CuentaContable As String = Row("Cuenta Contable").ToString
@@ -1883,9 +1875,9 @@ Partial Class General_SaldosIniciales
'VALIDACIONES
If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
If Not CveSubProyecto > 0 Then Alert($"No se encontró el SubProyecto: {SubProyecto} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
If Not CveEstadoActivoFijo > 0 Then Alert($"No se encontró el Estado: {Estado} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
If Not CveSubProyecto > 0 Then Alert($"No se encontró el SubProyecto: {SubProyecto} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
If Not CveEstadoActivoFijo > 0 Then Alert($"No se encontró el Estado: {Estado} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
If Not CveCliente > 0 Then CveCliente = -1
@@ -3950,58 +3942,5 @@ Partial Class General_SaldosIniciales
End Sub
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
Dim unnamed As Integer = 0
Dim cols As Integer
Dim columns As String()
Dim curRow As Integer = 0
Dim curCol As Integer = 0
Dim dataTable As DataTable = New DataTable()
Dim worksheet As ExcelWorksheet = excelFile.Worksheets(0)
For cols = 0 To worksheet.Rows(0).AllocatedCells.Count - 1
If firstRowHasHeaders Then
If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString().Trim)
Else
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
End If
curRow = 1
Else
dataTable.Columns.Add("Column " & (cols + 1))
End If
Next
While curRow < worksheet.Rows.Count
columns = New String(cols - 1) {}
For curCol = 0 To cols - 1
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
columns(curCol) = ""
Else
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
End If
Next
dataTable.Rows.Add(columns)
curRow += 1
End While
Return dataTable
End Function
End Class

View File

@@ -133,6 +133,9 @@
<li>
<asp:LinkButton ID="LnkAgregar" runat="server" Visible="false" OnClick="LnkAgregar_Click"><i class="fa fa-edit"></i><span style="padding: 10px">Editar Comunicado</span></asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkInconsistencias" runat="server" Visible="false" OnClick="LnkInconsistencias_Click1"><i class="fa fa fa-eye"></i><span style="padding: 10px">Inconsistencias</span></asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>

View File

@@ -210,10 +210,11 @@ Partial Class Inicio
If UsuarioActual.TienePermisoProceso(344) Then MuestraRSCOProximosAVencer()
Dim EsDEV = Not UsuarioActual.Empresa.FacturaProduccion
If Not EsDEV Then
If UsuarioActual.CveUsuario.Contiene(93, 1425, 2, 1606, 1472, 100, 1918) Then MuestraInconsistencias() '100
End If
'Dim EsDEV = Not UsuarioActual.Empresa.FacturaProduccion
'If Not EsDEV Then
' If UsuarioActual.CveUsuario.Contiene(93, 1425, 2, 1606, 1472, 100, 1918) Then MuestraInconsistencias() '100
'End If
'MUESTRA CALENDARIO SOLO ROL ADMINISTRADOR-AD
@@ -238,6 +239,11 @@ Partial Class Inicio
CargaDocumentacion()
If UsuarioActual.CveRol = 1 Or UsuarioActual.CveUsuario.Contiene(93, 1425, 2, 1606, 1472, 100, 1918) Then
LnkInconsistencias.Visible = True
End If
End If
End Sub
@@ -1353,4 +1359,11 @@ Partial Class Inicio
#End Region
Protected Sub LnkInconsistencias_Click1(sender As Object, e As EventArgs)
MuestraInconsistencias()
End Sub
End Class

View File

@@ -210,69 +210,90 @@
DataKeyNames="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Codigo,Codigo2,PS"
ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns>
<%--0--%>
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Codigo" />
<%--1--%>
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código2" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" Visible="False" DataTextField="Codigo2" />
<%--2--%>
<asp:BoundField Visible="false" DataField="CodigoBarras" HeaderText="CodigoBarras" ItemStyle-Width="10%" />
<%--3--%>
<asp:BoundField Visible="false" DataField="Clasificacion" HeaderText="Clasificación 2" ItemStyle-Width="7%" />
<%--4--%>
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Tipo" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}&Tipo={8}" Target="_blank" ItemStyle-Width="22.5%" HeaderText="Descripción" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="PS" />
<asp:BoundField Visible="false" DataField="SeccionAlmacen" HeaderText="Sección Almacén" ItemStyle-Width="10%" />
<%--5--%>
<asp:BoundField Visible="false" DataField="SeccionAlmacen" HeaderText="Sección Almacén" ItemStyle-Width="10%" />
<%--6--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Exist. Inicial" >
<ItemTemplate>
<asp:Label ID="lbSaldoI" runat="server" Text='<%# If(Eval("SaldoIniCant").ToString() = "0", "-", Eval("SaldoIniCant", "{0:#,###.######}")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<%--7--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Entradas">
<ItemTemplate>
<asp:Label ID="lbEntradasCant" runat="server" Text='<%#If(Eval("EntradaCant").ToString() = "0", "-", Eval("EntradaCant", "{0:#,###.######}")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<%--8--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Salidas">
<ItemTemplate>
<asp:Label ID="lbSalidasCant" runat="server" Text='<%# If(Eval("SalidaCant").ToString() = "0", "-", Eval("SalidaCant", "{0:#,###.######}")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<%--9--%>
<asp:BoundField Visible="false" DataField="CantidadPendienteSurtir" HeaderText="Pte Surtir" DataFormatString="{0:#,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right"/>
<%--10--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Exist. Final" ItemStyle-CssClass="LightGray">
<ItemTemplate>
<asp:Label ID="lbSaldoF" runat="server" Text='<%# If(Eval("SaldoFCant").ToString() = "0", "-", Eval("SaldoFCant", "{0:#,###.######}")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<asp:BoundField Visible="false" DataField="CantidadPendienteSurtir" HeaderText="Pte Surtir" DataFormatString="{0:#,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right"/>
<%--11--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Saldo Inicial">
<ItemTemplate>
<asp:Label ID="lbSaldoI2" runat="server" Text='<%# If(Eval("SaldoIniImp").ToString() = "0", "-", Eval("SaldoIniImp", "{0:N2}")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<%--12--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Entradas">
<ItemTemplate>
<asp:Label ID="lbEntradaImp" runat="server" Text='<%# If(Eval("EntradaImp").ToString() = "0", "-", Eval("EntradaImp", "{0:N2}")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<%--13--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Salidas">
<ItemTemplate>
<asp:Label ID="lbSalidaImp" runat="server" Text='<%# If(Eval("SalidaImp").ToString() = "0", "-", Eval("SalidaImp", "{0:N2}")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<%--14--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Saldo Final" >
<ItemTemplate>
<asp:Label ID="lbSaldoF2" runat="server" Text='<%# If(Eval("SaldoFImp").ToString() = "0", "-", Eval("SaldoFImp", "{0:N2}")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<%--15--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Último Costo">
<ItemTemplate>
<asp:Label ID="lbUltimoCosto" runat="server" Text='<%# If(Eval("UltimoCosto").ToString() = "0", "-", Eval("UltimoCosto", "{0:N2}")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="7.5%" HorizontalAlign="Right"></ItemStyle>
</asp:TemplateField>
<%--16--%>
<asp:BoundField Visible="false" DataField="FechaCompra" HeaderText="Última Compra" DataFormatString="{0:d}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right"/>
<%--17--%>
<asp:BoundField Visible="false" DataField="FechaVenta" HeaderText="Última Venta" DataFormatString="{0:d}" ItemStyle-Width="7%" ItemStyle-HorizontalAlign="Right"/>
<%--18--%>
<asp:BoundField Visible="false" DataField="PUPromedio" HeaderText="PU Promedio" DataFormatString="{0:N2}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right"/>
</Columns>

View File

@@ -108,7 +108,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
GvM.Columns(15).Visible = TienePermisoImportes
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
GvM.Columns(10).Visible = True
GvM.Columns(9).Visible = True
End If
End Sub
@@ -308,7 +308,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
'e.Row.Cells(4).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={e.Row.DataKey("CvePS")}&CveMoneda={e.Row.DataKey("CveMoneda")}&CveProveedor={e.Row.DataKey("CveProveedor")}&CveConcepto={e.Row.DataKey("CveConcepto")}&FechaI={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&FechaF={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&CveAlmacen={e.Row.DataKey("CveAlmacen")}&CvePersonal={e.Row.DataKey("CvePersonal")}'>{e.Row.DataKey("PS")}</a>"
Else
e.Row.Cells(9).BackColor = Drawing.Color.LightGray
e.Row.Cells(10).BackColor = Drawing.Color.LightGray
e.Row.Cells(14).BackColor = Drawing.Color.LightGray
'e.Row.FCLabel("lbSaldoI").Text = If(e.Row.DBCampo("SaldoIniCant").ToString().ToEntero = 0, "-", e.Row.DBCampo("SaldoIniCant").ToDouble.ToString("N2"))

View File

@@ -2820,12 +2820,15 @@ Partial Class Inventarios_TraspasoAlmacen
Private Sub CargaAlmacenDestino()
Dim DrAlmO As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimero("")
If DrAlmO("CveTipoAlmacen").ToString.ToEntero = 26 Then 'costeados
If DrAlmO("CveTipoAlmacen").ToString = "26" Then 'costeados
Dim tTipoAlmacen As String = "26"
'If UsuarioActual.CveUsuario = 1703 Then ''1703, Jesus lópez,codigo tempora. RMF.2022.10.17
' tTipoAlmacen = "1,16,26"
'End If
If ChkTransitorio.Checked Then
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (26) AND Estatus = 'Activo' ")
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($" CveTipoAlmacen IN ({tTipoAlmacen}) AND Estatus = 'Activo' ")
Else
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (26) ")
DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros($"CveTipoAlmacen IN ({tTipoAlmacen}) ")
End If
DdlAlmacenDestino.DataBind()

View File

@@ -73,6 +73,10 @@ Partial Class OS_OrdenesServicios
End Property
Private Property CveOS As Integer
Get
If ViewState("CveOS") Is Nothing Then
ViewState("CveOS") = -1
End If
Return ViewState("CveOS").ToString.ToEntero
End Get
Set(value As Integer)
@@ -367,8 +371,14 @@ Partial Class OS_OrdenesServicios
DVDatosAdicionalesAcum1.Visible = True
DVDatosAdicionalesAcum2.Visible = True
DVDatosAdicionalesAcum3.Visible = True
If CveOS = -1 Then
CargaCliente(-1, 1, True)
End If
Else
LblCuentaEquipoTH.Visible = False
LblCuentaEquipoTH.Visible = False
DdlCuentaEquipo.Visible = False
End If
@@ -377,6 +387,8 @@ Partial Class OS_OrdenesServicios
End Sub
#Region "DDL'S "
Protected Sub DdlPSDetalle_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPSDetalle.SelectedIndexChanged
If CveCliente > 0 OrElse DdlPSDetalle.SelectedValue = "-2" Then
@@ -759,12 +771,26 @@ Partial Class OS_OrdenesServicios
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
End If
End Sub
Private Sub CargaCliente(CveCliente As Integer, Optional Estatus As Integer = 1)
Private Sub CargaCliente(CveCliente As Integer, Optional Estatus As Integer = 1, Optional CargaPublicoGeneral As Boolean = False)
Dim ObjCliente As New ClsClientes()
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus) Then
Dim NombreCliente As String = "-1"
If CargaPublicoGeneral Then
NombreCliente = "PUBLICO EN GENERAL"
End If
If ObjCliente.GetClientes(CveCliente, NombreCliente, "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, Estatus) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
If CargaPublicoGeneral Then
CveCliente = ObjCliente.CveCliente
End If
TxtCodigo.Text = ObjCliente.Codigo
LblCliente.Text = String.Format("<a Class=""Texto"" href=""/Ventas/Clientes.aspx?CveCliente={0}"">{1}</a>", CveCliente, ObjCliente.Nombre)
NombreCliente = ObjCliente.Nombre
@@ -777,6 +803,8 @@ Partial Class OS_OrdenesServicios
ClienteRFC = ObjCliente.RFC
ClienteMail = ObjCliente.Mail
If ObjCliente.GetSucursales(CveCliente) Then
DdlSucursalCliente.DataSource = ObjCliente.DtResultados
DdlClienteSucursalCuenta.DataSource = ObjCliente.DtResultados

View File

@@ -254,15 +254,15 @@ Partial Class Ventas_RepRecuperacion
RutaPDF = "Empresas/Grales/Formatos/RepRecuperacion.rdlc"
End If
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 Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If

View File

@@ -351,15 +351,15 @@ Partial Class Ventas_RepRecuperacionDetalle
RutaPDF = "Empresas/Grales/Formatos/RepRecuperacionDetalle.rdlc"
End If
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 Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If