Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1594,6 +1594,7 @@ Public Class ClsRH
|
||||
End Property
|
||||
|
||||
Public Property TipoSangre As String
|
||||
Public Property CodigoDispersionVale As String = ""
|
||||
#End Region
|
||||
|
||||
#Region "Personal"
|
||||
@@ -1753,6 +1754,7 @@ Public Class ClsRH
|
||||
CveSubproyectoZona = -1
|
||||
End If
|
||||
|
||||
Me.CodigoDispersionVale = Data.Rows(0)("CodigoDispersionVale").ToString
|
||||
|
||||
End If
|
||||
Retorno = True
|
||||
@@ -1979,7 +1981,8 @@ Public Class ClsRH
|
||||
NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String,
|
||||
CveJornada As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveUsuarioNomina As Integer, Beneficiario As String, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1,
|
||||
Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Boolean = False, Optional CvePais As Integer = -1,
|
||||
Optional Pensionado As Boolean = False, Optional CveMedioTransporte As Integer = -1, Optional CveRegistroPatronal As Integer = -1, Optional CveEmpresaAsignado As Integer = -1, Optional CveTipoTrabajador As Integer = -1, Optional NetoPeriodo As Decimal = -1, Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1, Optional AreaGeografica As String = "A") As Boolean
|
||||
Optional Pensionado As Boolean = False, Optional CveMedioTransporte As Integer = -1, Optional CveRegistroPatronal As Integer = -1, Optional CveEmpresaAsignado As Integer = -1, Optional CveTipoTrabajador As Integer = -1, Optional NetoPeriodo As Decimal = -1,
|
||||
Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1, Optional AreaGeografica As String = "A", Optional CodigoDispersionVale As String = "-1") As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
Dim noguardoXcurp As Boolean = False
|
||||
@@ -2070,6 +2073,8 @@ Public Class ClsRH
|
||||
.Add("@TipoSangre", SqlDbType.VarChar).Value = TipoSangre
|
||||
.Add("@AreaGeografica", SqlDbType.VarChar).Value = AreaGeografica
|
||||
.Add("@CveSubTipoPeriodo", SqlDbType.Int).Value = CveSubTipoPeriodo
|
||||
.Add("@CodigoDispersionVale", SqlDbType.VarChar).Value = CodigoDispersionVale
|
||||
|
||||
|
||||
'.Add("@ErrorMostrarADS", SqlDbType.VarChar, 50).Direction = ParameterDirection.Output
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
@@ -2133,7 +2138,7 @@ Public Class ClsRH
|
||||
Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveUsuarioModifico As Integer = -1,
|
||||
Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Integer = -1, Optional CvePais As Integer = -1, Optional Pensionado As Boolean = False, Optional CveRegistroPatronal As Integer = -1,
|
||||
Optional CveEmpresaAsignado As Integer = -1, Optional CveMedioTransporte As Integer = -1, Optional EsReserva As Integer = -1, Optional Fiscalizable As Integer = -1, Optional CveTipoTrabajador As Integer = -1, Optional NetoPeriodo As Decimal = -1,
|
||||
Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1, Optional AreaGeografica As String = "") As Boolean
|
||||
Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1, Optional AreaGeografica As String = "", Optional CodigoDispersionVale As String = "-1") As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -2231,7 +2236,7 @@ Public Class ClsRH
|
||||
.Add("@AreaGeografica", SqlDbType.VarChar).Value = AreaGeografica
|
||||
|
||||
.Add("@CveSubTipoPeriodo", SqlDbType.Int).Value = CveSubTipoPeriodo
|
||||
|
||||
.Add("@CodigoDispersionVale", SqlDbType.VarChar).Value = CodigoDispersionVale
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -166,31 +166,39 @@
|
||||
<asp:Label ID="lblMedioCaptacion" runat="server" Text='<%# Eval("MedioCaptacion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--4--%>
|
||||
|
||||
<%--4--%>
|
||||
<asp:TemplateField HeaderText="Empresa" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblEmpresa" runat="server" Text='<%# Eval("EmpresaCRM")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--5--%>
|
||||
<asp:TemplateField HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblVendedor" runat="server" Text='<%# Eval("Vendedor")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--5--%>
|
||||
<%--6--%>
|
||||
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblImporte" runat="server" Text='<%# Eval("Importe","{0:c2}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--6--%>
|
||||
<%--7--%>
|
||||
<asp:TemplateField HeaderText="Apertura" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblFechaApertura" runat="server" Text='<%# Eval("FechaApertura","{0:d}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--7--%>
|
||||
<%--8--%>
|
||||
<asp:TemplateField HeaderText="Cierre" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblFechaCierre" runat="server" Text='<%# Eval("FechaCierre","{0:d}")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--8--%>
|
||||
<%--9--%>
|
||||
<asp:TemplateField HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("PS")%>'> </asp:Label>
|
||||
@@ -209,6 +217,13 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--12--%>
|
||||
<asp:TemplateField HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblClasificacion" runat="server" Text='<%# Eval("Clasificacion")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
@@ -280,7 +295,9 @@
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox runat="server" ID="ChkGiro" Text="Giro" />
|
||||
</td>
|
||||
<td style="text-align: left;"></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox runat="server" ID="ChkClasificacion" Text="Clasificación" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
@@ -173,13 +173,16 @@ public partial class CRM_RepAcercamientos : ClsPaginas
|
||||
GVDatos.Columns[1].Visible = ChkAcercamiento.Checked;
|
||||
GVDatos.Columns[2].Visible = ChkEtapa.Checked;
|
||||
GVDatos.Columns[3].Visible = ChkMedioCaptacion.Checked;
|
||||
GVDatos.Columns[4].Visible = ChkVendedor.Checked;
|
||||
GVDatos.Columns[5].Visible = ChkImporte.Checked;
|
||||
GVDatos.Columns[6].Visible = ChkApertura.Checked;
|
||||
GVDatos.Columns[7].Visible = ChkCierre.Checked;
|
||||
GVDatos.Columns[8].Visible = ChkPS.Checked;
|
||||
GVDatos.Columns[9].Visible = ChkEnPausa.Checked;
|
||||
GVDatos.Columns[10].Visible = ChkGiro.Checked;
|
||||
GVDatos.Columns[4].Visible = ChkMedioCaptacion.Checked;
|
||||
|
||||
GVDatos.Columns[5].Visible = ChkVendedor.Checked;
|
||||
GVDatos.Columns[6].Visible = ChkImporte.Checked;
|
||||
GVDatos.Columns[7].Visible = ChkApertura.Checked;
|
||||
GVDatos.Columns[8].Visible = ChkCierre.Checked;
|
||||
GVDatos.Columns[9].Visible = ChkPS.Checked;
|
||||
GVDatos.Columns[10].Visible = ChkEnPausa.Checked;
|
||||
GVDatos.Columns[11].Visible = ChkGiro.Checked;
|
||||
GVDatos.Columns[12].Visible = ChkClasificacion.Checked;
|
||||
|
||||
UPDatos.Update();
|
||||
|
||||
|
||||
@@ -5918,57 +5918,63 @@
|
||||
}
|
||||
|
||||
|
||||
function chkAnt(t, txt, importe, TotalSaldoCompra, CveMonedaAnticipo, TCAnticipo, CveMonedaOriginal, TCCompra, txtComision) {
|
||||
var Total = ToDouble($get('TxtTotal').value);
|
||||
debugger;
|
||||
var txtvalue = ToDouble(txt.value);
|
||||
var ImportePago, ImporteCompra;
|
||||
|
||||
var TCC = TCCompra / TCAnticipo;
|
||||
var importevalue = ToDouble(importe);
|
||||
function chkAnt(t, txt, importe, TotalSaldoCompra, CveMonedaAnticipo, TCAnticipo, CveMonedaOriginal, TCCompra, txtComision) {
|
||||
var Total = ToDouble($get('TxtTotal').value);
|
||||
debugger;
|
||||
var txtvalue = ToDouble(txt.value);
|
||||
var ImportePago, ImporteCompra;
|
||||
|
||||
if (CveMonedaAnticipo != CveMonedaOriginal) {
|
||||
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
|
||||
txtvalue = ToDouble(txtvalue / TCAnticipo);
|
||||
importevalue = ToDouble(importevalue / TCAnticipo);
|
||||
} else if (CveMonedaAnticipo == 2 && CveMonedaOriginal == 1) {
|
||||
txtvalue = ToDouble(txtvalue * TCAnticipo);
|
||||
importevalue = ToDouble(importevalue * TCAnticipo);
|
||||
}
|
||||
var TCC = TCCompra / TCAnticipo;
|
||||
var importevalue = ToDouble(importe);
|
||||
|
||||
if (CveMonedaAnticipo != CveMonedaOriginal) {
|
||||
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
|
||||
txtvalue = ToDouble(txtvalue / TCAnticipo);
|
||||
importevalue = ToDouble(importevalue / TCAnticipo);
|
||||
} else if (CveMonedaAnticipo == 2 && CveMonedaOriginal == 1) {
|
||||
txtvalue = ToDouble(txtvalue * TCAnticipo);
|
||||
importevalue = ToDouble(importevalue * TCAnticipo);
|
||||
}
|
||||
else { TCC = 1; }
|
||||
var DifSaldo = (TotalSaldoCompra - FnSumaValoresAnt());//.toFixed(2); // le agrego lo del valor actual para validarlo
|
||||
|
||||
|
||||
|
||||
if (t.checked)
|
||||
{
|
||||
if (DifSaldo > importevalue) {
|
||||
txt.value = toFixed(ToDouble(importevalue * TCC), 2);
|
||||
} else {
|
||||
txt.value = toFixed(ToDouble(DifSaldo * TCC), 2);
|
||||
}
|
||||
|
||||
|
||||
if (txtComision !== undefined && txtComision !== null) {
|
||||
let difFinal = (DifSaldo - importevalue) * TCC;
|
||||
if (difFinal > 0 && difFinal < 1) {
|
||||
txtComision.value = toFixed(roundToTwo(difFinal), 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
txt.value = "";
|
||||
}
|
||||
|
||||
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
||||
$("#LblAplicadoCompraAnt").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
||||
$("#LblAplicadoCompraAntComision").text(FormatoNumero(FnSumaValoresAntComisiones(), 2));
|
||||
$("#LblSaldoFactura").text(FormatoNumero(TotalSaldoCompra - FnSumaValoresAnt(), 2));
|
||||
|
||||
|
||||
}
|
||||
else { TCC = 1; }
|
||||
|
||||
var DifSaldo = (TotalSaldoCompra - FnSumaValoresAnt(CveMonedaAnticipo, CveMonedaOriginal));//.toFixed(2); // le agrego lo del valor actual para validarlo
|
||||
|
||||
if (t.checked) {
|
||||
|
||||
|
||||
let saldoVal = importevalue;
|
||||
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
|
||||
saldoVal = ToDouble(importevalue / TCC)
|
||||
} else if (CveMonedaAnticipo == 2 && CveMonedaOriginal == 1) {
|
||||
saldoVal = ToDouble(importevalue * TCC)
|
||||
}
|
||||
|
||||
if (DifSaldo > saldoVal) {
|
||||
txt.value = toFixed(ToDouble(saldoVal * TCC), 2);
|
||||
} else {
|
||||
txt.value = toFixed(ToDouble(DifSaldo * TCC), 2);
|
||||
}
|
||||
|
||||
|
||||
if (txtComision !== undefined && txtComision !== null) {
|
||||
let difFinal = (DifSaldo - importevalue) * TCC;
|
||||
if (difFinal > 0 && difFinal < 1) {
|
||||
txtComision.value = toFixed(roundToTwo(difFinal), 2);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
txt.value = "";
|
||||
}
|
||||
|
||||
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(CveMonedaAnticipo, CveMonedaOriginal), 2));
|
||||
$("#LblAplicadoCompraAnt").text(FormatoNumero(FnSumaValoresAnt(CveMonedaAnticipo, CveMonedaOriginal), 2));
|
||||
$("#LblAplicadoCompraAntComision").text(FormatoNumero(FnSumaValoresAntComisiones(CveMonedaAnticipo, CveMonedaOriginal), 2));
|
||||
$("#LblSaldoFactura").text(FormatoNumero(TotalSaldoCompra - FnSumaValoresAnt(CveMonedaAnticipo, CveMonedaOriginal), 2));
|
||||
|
||||
|
||||
}
|
||||
|
||||
function roundToTwo(num) {
|
||||
return Math.round(num * 100) / 100;
|
||||
@@ -5976,6 +5982,7 @@
|
||||
|
||||
function FnCambiaAnt(chk, txt, saldo, TotalSaldo, CveMonedaAnticipo, TCAnticipo, CveMonedaOriginal, txtComision) {
|
||||
|
||||
|
||||
var Total = ToDouble($get('TxtTotal').value);
|
||||
let txtComisionImporte = 0;
|
||||
debugger;
|
||||
@@ -6003,11 +6010,42 @@
|
||||
txtvalue = ToDouble(txtvalue * TCAnticipo);
|
||||
}
|
||||
|
||||
var SaldoCompra = toFixed(TotalSaldo - FnSumaValoresAnt() + ToDouble(txtvalue),2); // le agrego lo del valor actual para validarlo //parseFloat(parseFloat($get('HdnCompraSaldo').value).toFixed(2));
|
||||
|
||||
if (SaldoCompra < 0) txt.value = SaldoCompra - txtvalue;
|
||||
//minimo entre saldocompra y el saldoanticipo
|
||||
if (SaldoCompra < saldo) saldo = SaldoCompra;
|
||||
let amortizado = ToDouble(FnSumaValoresAnt(CveMonedaAnticipo, CveMonedaOriginal)) - ToDouble(txtvalue) ;
|
||||
let SaldoCompra = toFixed(TotalSaldo - amortizado, 2); // le agrego lo del valor actual para validarlo //parseFloat(parseFloat($get('HdnCompraSaldo').value).toFixed(2));
|
||||
|
||||
|
||||
if (SaldoCompra < 0) {//minimo entre saldocompra y el saldoanticipo
|
||||
|
||||
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
|
||||
|
||||
txt.value = SaldoCompra - ToDouble(txtvalue * TCAnticipo);
|
||||
|
||||
} else if (CveMonedaAnticipo == 2 && CveMonedaOriginal == 1) {
|
||||
|
||||
txt.value = SaldoCompra - ToDouble(txtvalue / TCAnticipo);
|
||||
|
||||
} else {
|
||||
txt.value = SaldoCompra - txtvalue;
|
||||
}
|
||||
}
|
||||
|
||||
let saldoVal = saldo;
|
||||
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
|
||||
saldoVal = ToDouble(saldo / TCAnticipo)
|
||||
} else if (CveMonedaAnticipo == 2 && CveMonedaOriginal == 1) {
|
||||
saldoVal = ToDouble(saldo * TCAnticipo)
|
||||
}
|
||||
|
||||
if (saldoVal > SaldoCompra ) {
|
||||
saldo = SaldoCompra;
|
||||
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
|
||||
saldoVal = ToDouble(saldo / TCAnticipo);
|
||||
saldo = ToDouble(saldo * TCAnticipo);
|
||||
} else if (CveMonedaAnticipo == 2 && CveMonedaOriginal == 1) {
|
||||
saldoVal = ToDouble(saldo * TCAnticipo)
|
||||
saldo = ToDouble(saldo / TCAnticipo);
|
||||
}
|
||||
}
|
||||
|
||||
if (ToDouble(txtvalue) > 0) {
|
||||
chk.checked = true;
|
||||
@@ -6015,15 +6053,16 @@
|
||||
chk.checked = false;
|
||||
}
|
||||
|
||||
if (ToDouble(txtvalue) > saldo) {
|
||||
txt.value = saldo;
|
||||
if (ToDouble(txtvalue) > saldoVal) {
|
||||
txt.value = FormatoNumero(saldo, 2);
|
||||
alert("El Importe no debe de exceder a el saldo");
|
||||
}
|
||||
}
|
||||
|
||||
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
||||
$("#LblAplicadoCompraAnt").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
||||
$("#LblAplicadoCompraAntComision").text(FormatoNumero(FnSumaValoresAntComisiones(), 2));
|
||||
$("#LblSaldoFactura").text(FormatoNumero(TotalSaldo - FnSumaValoresAnt(), 2));
|
||||
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(CveMonedaAnticipo, CveMonedaOriginal), 2));
|
||||
$("#LblAplicadoCompraAnt").text(FormatoNumero(FnSumaValoresAnt(CveMonedaAnticipo, CveMonedaOriginal), 2));
|
||||
$("#LblAplicadoCompraAntComision").text(FormatoNumero(FnSumaValoresAntComisiones(CveMonedaAnticipo, CveMonedaOriginal), 2));
|
||||
$("#LblSaldoFactura").text(FormatoNumero(TotalSaldo - FnSumaValoresAnt(CveMonedaAnticipo, CveMonedaOriginal), 2));
|
||||
|
||||
|
||||
}
|
||||
//funcion para truncar en lugar de redondear
|
||||
@@ -6032,37 +6071,49 @@
|
||||
return num.toString().match(re)[0];
|
||||
}
|
||||
|
||||
function FnSumaValoresAnt() {
|
||||
var totalPoints = 0;
|
||||
var t = '';
|
||||
function FnSumaValoresAnt(CveMonedaAnticipo, CveMonedaOriginal) {
|
||||
|
||||
var totalPoints = 0;
|
||||
|
||||
$('input[name*=TxtAnticipo]').each(function () {
|
||||
totalPoints += ToDouble($(this).val());
|
||||
// totalPoints += ToDouble($(this).val());
|
||||
let txtvalue = ToDouble($(this).val());
|
||||
//let asdasdasd = $(this).data('tcanticipo');
|
||||
let TCAnticipo = ToDouble($(this).data('tcanticipo'));
|
||||
|
||||
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
|
||||
txtvalue = ToDouble(txtvalue / TCAnticipo);
|
||||
} else if (CveMonedaAnticipo == 2 && CveMonedaOriginal == 1) {
|
||||
txtvalue = ToDouble(txtvalue * TCAnticipo);
|
||||
}
|
||||
totalPoints += txtvalue;
|
||||
});
|
||||
|
||||
//$('span[id*=LbTotal]').each(function () {
|
||||
// totalPoints += ToDouble($(this).val());
|
||||
//});
|
||||
|
||||
let respuesta = Math.round(totalPoints * 100) / 100;
|
||||
return respuesta
|
||||
return totalPoints
|
||||
}
|
||||
|
||||
function FnSumaValoresAntComisiones() {
|
||||
var totalPoints = 0;
|
||||
var t = '';
|
||||
function FnSumaValoresAntComisiones(CveMonedaAnticipo, CveMonedaOriginal) {
|
||||
|
||||
var totalPoints = 0;
|
||||
|
||||
$('input[name*=TxtComision]').each(function () {
|
||||
totalPoints += ToDouble($(this).val());
|
||||
//totalPoints += ToDouble($(this).val());
|
||||
let txtvalue = ToDouble($(this).val());
|
||||
let TCAnticipo = ToDouble($(this).data('tcanticipo'));
|
||||
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
|
||||
txtvalue = ToDouble(txtvalue / TCAnticipo);
|
||||
} else if (CveMonedaAnticipo == 2 && CveMonedaOriginal == 1) {
|
||||
txtvalue = ToDouble(txtvalue * TCAnticipo);
|
||||
}
|
||||
totalPoints += txtvalue;
|
||||
});
|
||||
|
||||
let respuesta = Math.round(totalPoints * 100) / 100;
|
||||
return respuesta
|
||||
return totalPoints
|
||||
}
|
||||
|
||||
|
||||
|
||||
function FnCambiaFacturaNC(saldo, txt, total, txtaplicado, chk) {
|
||||
var SumaImporte = 0, Importe = 0;
|
||||
|
||||
|
||||
@@ -8362,8 +8362,19 @@ Partial Class Compras_Compras
|
||||
Pago.TCPago = TipoCambioAnt
|
||||
Pago.CveProveedor = gvr.DataKey("CveProveedor").ToEntero
|
||||
|
||||
If ChkPagarConPesos.Checked Then Pago.TCCambioMoneda = 1 / TipoCambioAnt
|
||||
If ChkPagarConDolares.Checked Then Pago.TCCambioMoneda = TipoCambioAnt
|
||||
Dim tTCFecha As Double = If(Not gvr.DataKey("TCCompra").ToDouble > 1, GlobalTipoCambio(gvr.DataKey("Fecha").ToDate), gvr.DataKey("TCCompra").ToDouble)
|
||||
|
||||
If ChkPagarConPesos.Checked Then
|
||||
Pago.TCCambioMoneda = 1 / TipoCambioAnt
|
||||
If CveMoneda = 2 Then
|
||||
'Pago.TCCambioMoneda = tTCFecha.ToDecimal
|
||||
Pago.TCCambioMoneda = 1 / tTCFecha.ToDecimal
|
||||
End If
|
||||
End If
|
||||
|
||||
If ChkPagarConDolares.Checked Then
|
||||
Pago.TCCambioMoneda = TipoCambioAnt
|
||||
End If
|
||||
|
||||
Select Case gvr.DataKey("TipoDocto")
|
||||
Case "NC", "DEV", "RNC"
|
||||
@@ -8415,10 +8426,10 @@ Partial Class Compras_Compras
|
||||
|
||||
If ErrorMovtosCxP = 0 AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePolizaNueva, UsuarioActual) Then
|
||||
ErrorMovtosCxP = 1
|
||||
'If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
' GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
' ErrorPrepolizaDescuadre = True
|
||||
'End If
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Select Case ErrorMovtosCxP
|
||||
@@ -9780,8 +9791,9 @@ Partial Class Compras_Compras
|
||||
Dim tTCFecha As Double = If(Not e.Row.DBCampo("TCCompra").ToDouble > 1, GlobalTipoCambio(e.Row.DBCampo("Fecha").ToDate), e.Row.DBCampo("TCCompra").ToDouble)
|
||||
|
||||
|
||||
e.Row.FCTextBox("TxtAnticipo").Attributes.Add("data-tcanticipo", tTCFecha.ToString)
|
||||
|
||||
Dim TCAnt As Decimal = If(DdlMoneda.SelectedValue = "1", 1, If(CveCompra > 0, LblTC.Text.ToDecimal, TxtTC.Text.ToDecimal))
|
||||
Dim TCAnt As Decimal = If(DdlMoneda.SelectedValue = "1", 1, If(CveCompra > 0, LblTC.Text.Replace("TC:", "").ToDecimal, TxtTC.Text.ToDecimal))
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.CveEmpresa.Contiene(13, 83) Then
|
||||
|
||||
@@ -964,8 +964,9 @@ Partial Class Contratos_Default
|
||||
TipoContrato = ObjContratos.CveContratoTipo
|
||||
TxtPorcentajeComision.Text = ObjContratos.PorcentajeComision.ToString
|
||||
CveContratoTipo = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero
|
||||
TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString
|
||||
|
||||
TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString
|
||||
|
||||
|
||||
If CveContratoTipo = 33 Then
|
||||
TabContratosGastos.Visible = False
|
||||
TabAF.Visible = False
|
||||
@@ -1106,6 +1107,8 @@ Partial Class Contratos_Default
|
||||
ChkFacAutomatica.Checked = CBool(ObjContratos.DtResultados.Rows(0)("FacturacionCiclicaAutomatico"))
|
||||
DdlDiaFact.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("DiaMesFacturacion").ToString())
|
||||
TxtObservaciones.Text = ObjContratos.DtResultados.Rows(0)("Observaciones").ToString
|
||||
TxtObsGeneral.Text = ObjContratos.DtResultados.Rows(0)("ObservacionesGenerales").ToString
|
||||
|
||||
ChkAplicaFacCiclica_CheckedChanged(ChkAplicaFacCiclica, EventArgs.Empty)
|
||||
|
||||
If ObjContratos.DtResultados.Rows(0)("CvePeriodo").ToString().ToEntero() > 0 Then
|
||||
@@ -1387,7 +1390,8 @@ Partial Class Contratos_Default
|
||||
PorcentajeComision:=TxtPorcentajeComision.Text.ToEntero, TipoGarantia:=DdlTipoGarantia.SelectedValue.ToEntero, Folio:=TxtFolio.Text.ToEntero, FechaVenc:=txtFechaVenc.Text.ToDate, EstatusFianza:=DdlEstatusFianza.SelectedValue.ToEntero,
|
||||
CvePeriodo:=DdlPeriodo.SelectedValue.ToEntero, CveCuentaEquipo:=DdlCuentaEquipo.SelectedValue.ToEntero, CveContratoPlantilla:=DdlPlantillaContrato.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero,
|
||||
Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=DdlClienteDireccionEnvio.SelectedValue.ToEntero, AplicaImpuestosLocales:=ChkImpuestosLocales.Checked, CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(),
|
||||
FacturacionCicilica:=ChkAplicaFacCiclica.Checked, FacturacionCiclicaAutomatico:=ChkFacAutomatica.Checked, DiaMesFacturacion:=If(DdlDiaFact.SelectedValue.ToEntero() < 0, 0, DdlDiaFact.SelectedValue.ToEntero()))
|
||||
FacturacionCicilica:=ChkAplicaFacCiclica.Checked, FacturacionCiclicaAutomatico:=ChkFacAutomatica.Checked, DiaMesFacturacion:=If(DdlDiaFact.SelectedValue.ToEntero() < 0, 0, DdlDiaFact.SelectedValue.ToEntero()),
|
||||
ObservacionesGenerales:=TxtObsGeneral.Text.Trim)
|
||||
|
||||
|
||||
TieneError = Not GuardaFianzas(ObjContratos)
|
||||
|
||||
@@ -153,6 +153,7 @@
|
||||
<TextRun>
|
||||
<Value>Descripcion</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -203,7 +204,7 @@
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.6cm</Height>
|
||||
<Height>0.38833cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -216,6 +217,7 @@
|
||||
<TextRun>
|
||||
<Value>=iif(CDec(Fields!Autorizado.Value)=0,"-",Fields!Autorizado.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>#,0</Format>
|
||||
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>
|
||||
</Style>
|
||||
@@ -234,8 +236,7 @@
|
||||
<BackgroundColor>=IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent"))</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
<PaddingTop>1pt</PaddingTop>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
@@ -251,6 +252,7 @@
|
||||
<TextRun>
|
||||
<Value>= IIF( Parameters!PresupuestoRestrictivo.Value = "2", iif(CDec(Fields!Comprometido.Value)=0,"-",Fields!Comprometido.Value), iif(CDec(Fields!Ejercido.Value)=0,"-",Fields!Ejercido.Value))</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>
|
||||
</Style>
|
||||
@@ -269,8 +271,7 @@
|
||||
<BackgroundColor>=IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent"))</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
<PaddingTop>1pt</PaddingTop>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
@@ -286,6 +287,7 @@
|
||||
<TextRun>
|
||||
<Value>=iif(CDec(Fields!EjercidoPorcentaje.Value)=0,"-",Fields!EjercidoPorcentaje.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>
|
||||
</Style>
|
||||
@@ -304,8 +306,7 @@
|
||||
<BackgroundColor>=IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent"))</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
<PaddingTop>1pt</PaddingTop>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
@@ -321,6 +322,7 @@
|
||||
<TextRun>
|
||||
<Value>=iif(CDec(Fields!PorEjercer.Value)=0,"-",Fields!PorEjercer.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>
|
||||
</Style>
|
||||
@@ -339,8 +341,7 @@
|
||||
<BackgroundColor>=IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent"))</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
<PaddingTop>1pt</PaddingTop>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
@@ -356,6 +357,7 @@
|
||||
<TextRun>
|
||||
<Value>=iif(CDec(Fields!PorEjercerPorcentaje.Value)=0,"-",Fields!PorEjercerPorcentaje.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>
|
||||
</Style>
|
||||
@@ -374,8 +376,7 @@
|
||||
<BackgroundColor>=IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent"))</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
<PaddingTop>1pt</PaddingTop>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
@@ -397,8 +398,9 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Importe</Value>
|
||||
<Value>Autorizado</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -435,8 +437,9 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Importe</Value>
|
||||
<Value>=IIF(Parameters!PresupuestoRestrictivo.Value = "2","En Proceso","Ejercido")</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -475,6 +478,7 @@
|
||||
<TextRun>
|
||||
<Value>%</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -511,8 +515,9 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Importe</Value>
|
||||
<Value>Por Ejercer</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -551,6 +556,7 @@
|
||||
<TextRun>
|
||||
<Value>%</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<Color>White</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -594,6 +600,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Agrupador.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Color>=IIf(Fields!Tipo.Value = 0, "White","Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -611,8 +618,7 @@
|
||||
<BackgroundColor>=IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent"))</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
<PaddingTop>1pt</PaddingTop>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
@@ -625,7 +631,7 @@
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>3.39562cm</Top>
|
||||
<Left>0.17167cm</Left>
|
||||
<Height>1.2cm</Height>
|
||||
<Height>0.98833cm</Height>
|
||||
<Width>19.81203cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
@@ -663,7 +669,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>EJERCIDO</Value>
|
||||
<Value>=IIF(Parameters!PresupuestoRestrictivo.Value = "2","En Proceso","Ejercido")</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<Color>Blue</Color>
|
||||
|
||||
@@ -7198,11 +7198,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
using (ClsNominas ObjMovt = new ClsNominas())
|
||||
{
|
||||
ObjMovt.GetMovtoPermanenteSaldos(UsuarioActual.CveEmpresa,SRCvePersonal, CcveMovtoPermanente);
|
||||
ObjMovt.GetMovtoPermanenteSaldos(UsuarioActual.CveEmpresa, SRCvePersonal, CcveMovtoPermanente);
|
||||
GVMovtoPermanenteSaldos.DataSource = ObjMovt.DtResultados;
|
||||
GVMovtoPermanenteSaldos.DataBind();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CargaConcepto();
|
||||
DdlConcepto.SelectedValueExist(cveConcepto);
|
||||
TxtDescripcion.Text = descripcion.ToString();
|
||||
@@ -9829,7 +9829,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
SinSelccion,
|
||||
Bancomer,
|
||||
Banorte
|
||||
Banorte,
|
||||
Banamex
|
||||
}
|
||||
|
||||
|
||||
@@ -9885,7 +9886,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
DdlCuenta.Items.Clear();
|
||||
DataTable DTCuentas = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta <> 1 AND UsaLayout = 'True' AND LEN(ConvenioPagoElectronico) > 0 ");
|
||||
DTCuentas.CaseSensitive = false;
|
||||
DdlCuenta.DataSource = DTCuentas.FiltraParametros(" Banco IN('BANCOMER','BANORTE','BBVA Bancomer','BBVA')");
|
||||
DdlCuenta.DataSource = DTCuentas.FiltraParametros(" Banco IN('BANCOMER','BANORTE','BBVA Bancomer','BBVA','BANAMEX')");
|
||||
DdlCuenta.DataBind();
|
||||
DdlCuenta.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
DdlCuenta.SelectedValueExist("-1");
|
||||
@@ -9915,6 +9916,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
Banco = Bancos.Banorte;
|
||||
DivModalLayoutBancosFecha.Visible = true;
|
||||
}
|
||||
else if (DdlCuenta.SelectedItem.Text.ToUpper().Contains("BANAMEX"))
|
||||
{
|
||||
Banco = Bancos.Banamex;
|
||||
DivModalLayoutBancosFecha.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ConvenioPagoElectronico = string.Empty;
|
||||
@@ -10016,6 +10022,17 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (Banco == Bancos.Banamex)
|
||||
{
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetDispersionnominaXLS(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CrearLayoutNominaBanamex(objnom.DtResultados.Copy());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10247,6 +10264,139 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void CrearLayoutNominaBanamex(DataTable DTNomina)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringBuilder SbErrores = new StringBuilder();
|
||||
bool ErroresValidaciones = false;
|
||||
|
||||
|
||||
SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout");
|
||||
|
||||
foreach (DataRow dRow in DTNomina.Rows)
|
||||
{
|
||||
//string RFC = dRow["RFC"].ToString();
|
||||
string Nombre = dRow["Nombre"].ToString();
|
||||
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||
decimal Importe = dRow["Importe"].ToString().ToDecimal();
|
||||
|
||||
//if (RFC.Trim().Length == 0)
|
||||
// SbErrores.AppendLine($"El RFC es requerido del empleado {Nombre}<br/>");
|
||||
|
||||
//System.Text.RegularExpressions.Match Coincidencia = System.Text.RegularExpressions.Regex.Match(RFC, @"/^([A-Z,Ñ,&]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$/");
|
||||
//if (!Coincidencia.Success)
|
||||
//{
|
||||
// SbErrores.AppendLine($"El RFC {RFC} del empleado {Nombre} no es valido <br/>");
|
||||
// ErroresValidaciones = true;
|
||||
//}
|
||||
|
||||
if (BancoNumCuenta.Trim().Length != 10)
|
||||
{
|
||||
SbErrores.AppendLine($"Empleado {Nombre} numero de cuenta incorrecto, la cuenta debe de tener 10 caracteres<br/>"); // Bancomer 10 caracteres
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
|
||||
|
||||
if (Importe <= 0)
|
||||
{
|
||||
SbErrores.AppendLine($"Empleado {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0
|
||||
ErroresValidaciones = true;
|
||||
}
|
||||
}
|
||||
|
||||
ErroresValidaciones = false;
|
||||
|
||||
//LAYOUT “C” FORMATOS PARA IMPORTACIÓN (TEF / TEF INTELAR)
|
||||
//DOC: https://www.banamex.com/resources/bancanets/premium/esp/contenedor/archivos/TEF_Version_C_PagosCobros_Masivos.pdf
|
||||
if (!ErroresValidaciones)
|
||||
{
|
||||
DataTable DTCuentas = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa);
|
||||
DataRow RowCuenta = DTCuentas.FiltroPrimero($"CveCuenta={DdlCuenta.SelectedValue}");
|
||||
var ClaveMoneda = "001"; // PESOS MEXICANOS
|
||||
|
||||
//REGISTRO DE CONTROL - IMPORTACIÓN
|
||||
var TipoRegistro = "1";
|
||||
var NumeroCliente = ("111511111111").Trim().PadLeft(12, '0'); //CONVENIO
|
||||
|
||||
var Fecha = TxtModalLayoutBancosFecha.Text.ToDate();
|
||||
var FechaPago = $"{Fecha.Day.ToString().PadLeft(2, '0')}{Fecha.ToString("MM")}{Fecha.Year.ToString().Replace("20", "")}";
|
||||
var Secuencia = (1).ToString("0000");
|
||||
var RazonSocial = (UsuarioActual.Empresa.Empresa).Replace("-Prueba", "").Trim().PadRight(36);
|
||||
var Descripcion = ("TEST").Trim().PadRight(20);
|
||||
var Naturaleza = "12"; //= 12 Pagos interbancarios CLABE, 05 Nomina banamex
|
||||
var Instrucciones = ("").Trim().PadRight(40);
|
||||
var Version = "C";
|
||||
var Volumen = "0";
|
||||
var Caracteristicas = "1"; // 0= Si es modificable, 1 = Solo lectura
|
||||
|
||||
sb.AppendLine($"{TipoRegistro}{NumeroCliente}{FechaPago}{Secuencia}{RazonSocial}{Descripcion}{Naturaleza}{Instrucciones}{Version}{Volumen}{Caracteristicas}");
|
||||
|
||||
|
||||
//REGISTRO GLOBAL - IMPORTACIÓN
|
||||
var TipoReg2 = "2";
|
||||
var TipoOpe2 = "1"; //0 = Si es Abono, 1 = Si es Cargo
|
||||
var ImporteTotal = DTNomina.SUMD("Importe").ToString("0000000000000000.00").Replace(".", "");//16 enteros y 2 decimales
|
||||
var TipoCuenta = "01"; //CUENTA DE CHEQUES
|
||||
var Sucursal = "5555";
|
||||
var NumCuenta = ("9999999").Trim().PadLeft(20, '0'); //OBTENER DE BANCOS CUENTAS
|
||||
var Espacio = ("").Trim().PadRight(20);
|
||||
|
||||
sb.AppendLine($"{TipoReg2}{TipoOpe2}{ClaveMoneda}{ImporteTotal}{TipoCuenta}{Sucursal}{NumCuenta}{Espacio}");
|
||||
|
||||
//REGISTRO DE CARGOS O ABONOS INDIVIDUALES - IMPORTACIÓN
|
||||
int Count = 1;
|
||||
foreach (DataRow dRow in DTNomina.Rows)
|
||||
{
|
||||
var TipoReg3 = "3"; //Registro de Movtos. Individuales
|
||||
var TipoOpe3 = "0"; //0 = Si es Abono, 1 = Si es Cargo (solo aplica para cobros)
|
||||
|
||||
string Nombres = dRow["Nombres"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", "");
|
||||
string APaterno = dRow["APaterno"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", "");
|
||||
string AMaterno = dRow["AMaterno"].ToString().Replace("ñ,Ñ", "n").Replace("*,#,$,%,=,+", "");
|
||||
//string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||
|
||||
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||
decimal Importe = dRow["Importe"].ToString().ToDecimal().RoundSQL(2);
|
||||
|
||||
var StrImporte = Importe.ToString("0000000000000000.00").Replace(".", "");
|
||||
var StrTipoCuenta = "01";// 01- Cheques / CLABE
|
||||
var StrCuenta = BancoNumCuenta.Trim().PadLeft(20, '0'); //USARA TARJETA DE DEBITO
|
||||
var ReferenciaAlfa = ("PAGO03072024NOM").PadRight(40); //No se ocupa si es nomina banamex
|
||||
var Beneficiario = ($"{Nombres},{APaterno}/{AMaterno}").PadRight(55);
|
||||
var Inst3 = ("").PadRight(40);
|
||||
var DescTEF = ("").PadRight(24);
|
||||
var ClaveBanco = ("0012").PadRight(4); //BANCOMER //No se ocupa si es nomina baname
|
||||
var ReferenciaNum = ("2222222").PadRight(7, '0'); //QUE TOME DE LA CvePersonal como folio
|
||||
var Plazo = "00"; // MISMO DIA
|
||||
|
||||
sb.AppendLine($"{TipoReg3}{TipoOpe3}{ClaveMoneda}{StrImporte}{StrTipoCuenta}{StrCuenta}{ReferenciaAlfa}{Beneficiario}{Inst3}{DescTEF}{ClaveBanco}{ReferenciaNum}{Plazo}00");
|
||||
|
||||
|
||||
Count = Count + 1;
|
||||
}
|
||||
|
||||
//REGISTRO DE TOTALES - IMPORTACIÓN
|
||||
var TipoReg4 = "4";
|
||||
var NumAbonos = Count.ToString("000000");
|
||||
var NumCargos = Count.ToString("000000");
|
||||
|
||||
sb.AppendLine($"{TipoReg4}{ClaveMoneda}{NumAbonos}{ImporteTotal}{NumCargos}{ImporteTotal}");
|
||||
|
||||
Response.Clear();
|
||||
Response.ClearHeaders();
|
||||
Response.AppendHeader("Content-Length", sb.ToString());
|
||||
Response.ContentType = "text/plain";
|
||||
//Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{NowADS().ToString("yyyyMMddhhmmss").ToString()}.txt\"");
|
||||
Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina {DdlPeriodo.SelectedItem.Text}.txt\"");
|
||||
Response.Write(sb.ToString());
|
||||
RegistraScript("$('#ModalLayoutBancos').modal('hide');");
|
||||
Response.Flush();
|
||||
Response.End();
|
||||
}
|
||||
else
|
||||
Alert(SbErrores.ToString(), TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -1615,12 +1615,28 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVNetoPeriodo" visible="false" >
|
||||
<asp:TextBox CssClass="form-control" ID="TxtNetoPeriodo" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtNetoPeriodo" Text="Neto Periodo:"></asp:Label>
|
||||
<i></i>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVNetoPeriodo" visible="false">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtNetoPeriodo" runat="server" MaxLength="10"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtNetoPeriodo" Text="Neto Periodo:"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVCodigoDispersionVale" visible="false">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtCodigoDispersionVale" runat="server" MaxLength="25"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtNetoPeriodo" Text="Código Dispersion Vale:"></asp:Label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMetodoPago" Width="100%" runat="server" AppendDataBoundItems="true" CausesValidation="true" CssClass="form-control input-sm select2me" DataTextField="MetodoPago" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
|
||||
@@ -1057,6 +1057,7 @@ Partial Class RH_Personal
|
||||
|
||||
If UsuarioActual.CveRol = 1 Or UsuarioActual.CveUsuario = 100 Then
|
||||
DVNetoPeriodo.Visible = True
|
||||
DVCodigoDispersionVale.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -1878,6 +1879,8 @@ Partial Class RH_Personal
|
||||
DdlRegistroPatronal.SelectedValueExist(ObjPersonal.DtResultados.Rows(0)("CveRegistroPatronal").ToString)
|
||||
DdlEmpresaAsignada.SelectedValueExist(ObjPersonal.DtResultados.Rows(0)("CveEmpresaAsignado").ToString)
|
||||
|
||||
TxtCodigoDispersionVale.Text = ObjPersonal.CodigoDispersionVale
|
||||
|
||||
'Carga Incidencias
|
||||
BtnConsultarAsistencia_Click(Me, New System.EventArgs)
|
||||
|
||||
@@ -2053,7 +2056,7 @@ Partial Class RH_Personal
|
||||
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(),
|
||||
Sindicalizado:=ChkSindicalizado.Checked, Pensionado:=ChkPensionado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero(), CveRegistroPatronal:=DdlRegistroPatronal.SelectedValue.ToEntero(),
|
||||
CveEmpresaAsignado:=DdlEmpresaAsignada.SelectedValue.ToEntero, CveTipoTrabajador:=DdlTipoTrabajador.SelectedValue.ToEntero(), NetoPeriodo:=TxtNetoPeriodo.Text.ToDecimal, TipoSangre:=DdlTipoSangre.SelectedValue, CveSubTipoPeriodo:=CveSubTipoPeriodo,
|
||||
AreaGeografica:=DdlAreageografica.SelectedValue) Then
|
||||
AreaGeografica:=DdlAreageografica.SelectedValue, CodigoDispersionVale:=TxtCodigoDispersionVale.Text.Trim) Then
|
||||
|
||||
If Archivo.Exists Then
|
||||
|
||||
@@ -2140,7 +2143,7 @@ Partial Class RH_Personal
|
||||
CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), Pensionado:=ChkPensionado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero(),
|
||||
CveRegistroPatronal:=DdlRegistroPatronal.SelectedValue.ToEntero(), CveEmpresaAsignado:=DdlEmpresaAsignada.SelectedValue.ToEntero(), EsReserva:=If(chkEsReserva.Checked, 1, 0),
|
||||
Fiscalizable:=If(chkNoFiscalizar.Checked, 0, 1), CveTipoTrabajador:=DdlTipoTrabajador.SelectedValue.ToEntero(), NetoPeriodo:=TxtNetoPeriodo.Text.ToDecimal, TipoSangre:=DdlTipoSangre.SelectedValue, CveSubTipoPeriodo:=CveSubTipoPeriodo,
|
||||
AreaGeografica:=DdlAreageografica.SelectedValue) Then
|
||||
AreaGeografica:=DdlAreageografica.SelectedValue, CodigoDispersionVale:=TxtCodigoDispersionVale.Text.Trim) Then
|
||||
|
||||
'Funcion usa RH Familiares
|
||||
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
|
||||
|
||||
@@ -18279,7 +18279,7 @@ Partial Class Ventas
|
||||
|
||||
If ImgAntiPend.Visible Then
|
||||
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC','IxC') ", "")}")
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC','IxC','Ant') ", "")}")
|
||||
If DtMovtos.Rows.Count = 0 Then
|
||||
ImgAntiPend.Visible = False
|
||||
End If
|
||||
@@ -18323,7 +18323,7 @@ Partial Class Ventas
|
||||
|
||||
If ImgAntiPend.Visible Then
|
||||
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC','IxC') ", "")}")
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC','IxC','Ant') ", "")}")
|
||||
If DtMovtos.Rows.Count = 0 Then
|
||||
ImgAntiPend.Visible = False
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user