Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -594,7 +594,7 @@ Public Class ClsMovimientos
|
||||
Public Function GetCxPEmpresa(CveProveedor As Integer, FechaVencimientoInicio As String, FechaVencimientoFin As String, CveSubProyecto As Integer, DiasVencidos As Integer, CveUsuarioRegistro As Integer,
|
||||
CveUsuarioProgramo As Integer, CveUsuarioResponsable As Integer, CveClasificacion As Integer, CveMoneda As Integer, CveTipoPagoProgramo As Integer, CveEstatusFactura As Integer,
|
||||
CveAplicaNC As Integer, CveEmpresa As Integer, Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1", Optional CveTipoProveedor As Integer = 0,
|
||||
Optional AgrupadoPorSubProyecto As Boolean = False) As Boolean
|
||||
Optional AgrupadoPorSubProyecto As Boolean = False, Optional VerEnPesos As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_Proveedores")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -616,7 +616,8 @@ Public Class ClsMovimientos
|
||||
.Add("@FechaVF", SqlDbType.VarChar).Value = FechaVF
|
||||
.Add("@CodigoProgramacion", SqlDbType.VarChar).Value = CodigoProgramacion
|
||||
.Add("@CveTipoProveedor", SqlDbType.TinyInt).Value = CveTipoProveedor
|
||||
.Add("@AgrupadoPorSubProyecto", SqlDbType.Bit).Value = AgrupadoPorSubProyecto
|
||||
.Add("@AgrupadoPorSubProyecto", SqlDbType.Bit).Value = AgrupadoPorSubProyecto
|
||||
.Add("@VerEnPesos", SqlDbType.Bit).Value = VerEnPesos
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -341,9 +341,10 @@
|
||||
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
<asp:CheckBox Text=" No Validar ante SAT" ID="ChkNoValidaSAT" CssClass="md-checksd" runat="server" Checked="false" Visible="false" />
|
||||
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
||||
<asp:CheckBox Text="Descuento" ID="chkaplicaDescuento" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuento_CheckedChanged" AutoPostBack="true" Visible="false" />
|
||||
<asp:TextBox runat="server" ID="TxtDescuenoMasivo" ClientIDMode="Static" onkeyup ="DescuenoMasivo(this)" Visible="false" Width="60px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuenoMasivo" FilterType="Custom" ValidChars="1234567890+" />
|
||||
<asp:CheckBox Text="Descuento" ID="chkaplicaDescuento" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuento_CheckedChanged" AutoPostBack="true" Visible="false" />
|
||||
<asp:CheckBox Text="Descuento Masivo" ID="chkaplicaDescuentoMasivo" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuentoMasivo_CheckedChanged" AutoPostBack="true" Visible="false" />
|
||||
<asp:TextBox runat="server" ID="TxtDescuenoMasivo" ClientIDMode="Static" onkeyup="DescuenoMasivo(this)" Visible="false" Width="60px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuenoMasivo" FilterType="Custom" ValidChars="1234567890+" />
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@@ -477,6 +478,15 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 14 --%>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Moneda</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<%-- 15 --%>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Auxiliar</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
@@ -601,7 +611,6 @@
|
||||
var Facturas = '';
|
||||
|
||||
function FnSuma(t, txt, importe) {
|
||||
debugger;
|
||||
var chkPesosBancos = $get("ChkPagarPesos");
|
||||
var chkDolaresBancos = $get("ChkPagarDolares");
|
||||
|
||||
@@ -612,9 +621,9 @@
|
||||
}
|
||||
|
||||
if (chkPesosBancos && chkPesosBancos.checked) {
|
||||
CambiaPesosDolares()
|
||||
CambiaPesosDolares();
|
||||
} else if (chkDolaresBancos && chkDolaresBancos.checked) {
|
||||
CambiaDolaresPesos()
|
||||
CambiaDolaresPesos();
|
||||
}
|
||||
else {
|
||||
var Suma = SumaValores();
|
||||
@@ -622,7 +631,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
function SumaValores(aplicaTC) {
|
||||
function SumaValores(aplicaTC, cveMonedaPago = 0) {
|
||||
|
||||
var Importe = 0;
|
||||
var Comision = 0.00;
|
||||
@@ -637,11 +646,43 @@
|
||||
idd = textBoxes[i].id.replace('C_GvCxP_TxtAbonar_', '');
|
||||
Facturas = Facturas + (Importe == 0 ? '' : ', ') + $get("C_GvCxP_HplF_" + idd).innerText;
|
||||
let importeFactura = 0;
|
||||
if (aplicaTC && $get('TxtTC') != null) {
|
||||
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
|
||||
} else {
|
||||
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
|
||||
if (cveMonedaPago == 0) {
|
||||
if (aplicaTC && $get('TxtTC') != null) {
|
||||
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
|
||||
} else {
|
||||
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
}
|
||||
} else {
|
||||
let cveMonedaCompra = textBoxes[i].getAttribute("cvemoneda");
|
||||
|
||||
switch (cveMonedaPago) {
|
||||
case 1: //PAGO CON PESOS
|
||||
|
||||
//SI SON DOLARES MULTIPLICAR POR TC
|
||||
if (cveMonedaCompra == '2') {
|
||||
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
|
||||
//MISMA MONEDA DEBE SOLO SUMAR
|
||||
} else if (cveMonedaCompra == '1') {
|
||||
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
}
|
||||
|
||||
break;
|
||||
case 2: //PAGO CON DOLARES
|
||||
|
||||
//MISMA MONEDA DEBE SOLO SUMAR
|
||||
if (cveMonedaCompra == '2') {
|
||||
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
//SI SON PESOS DIVIDIR ENTRE EL TC
|
||||
} else if (cveMonedaCompra == '1') {
|
||||
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) / parseFloat($get('TxtTC').value), 2).split(',').join(''));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Importe = parseFloat(Importe) + importeFactura;
|
||||
}
|
||||
}
|
||||
@@ -699,53 +740,91 @@
|
||||
}
|
||||
|
||||
if (chkPesosBancos && chkPesosBancos.checked) {
|
||||
CambiaPesosDolares()
|
||||
CambiaPesosDolares();
|
||||
} else if (chkDolaresBancos && chkDolaresBancos.checked) {
|
||||
CambiaDolaresPesos()
|
||||
CambiaDolaresPesos();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function CambiaPesosDolares() {
|
||||
let ImporteDolares = SumaValores(true);
|
||||
if ('<%= Me.FiltrarCuentas.ToString() %>' == '1') {
|
||||
let ImporteDolares = SumaValores(true);
|
||||
|
||||
$get('TxtImporte').value = FormatoNumero(ImporteDolares, 2);
|
||||
$('#LtlTotalMXN').text(FormatoNumero(ImporteDolares, 2))
|
||||
$get('TxtImporte').value = FormatoNumero(ImporteDolares, 2);
|
||||
$('#LtlTotalMXN').text(FormatoNumero(ImporteDolares, 2))
|
||||
|
||||
if ($("#LbImporteME").length) {
|
||||
$get('LbImporteME').innerHTML = '$ ' + FormatoNumero(SumaValores(false), 2) + ' USD';
|
||||
$get('TxtImporte').value = FormatoNumero(ToDouble(ImporteDolares), 2);
|
||||
$get('LtlTotalMXN').value = FormatoNumero(ToDouble(ImporteDolares), 2);
|
||||
if ($("#LbImporteME").length) {
|
||||
$get('LbImporteME').innerHTML = '$ ' + FormatoNumero(SumaValores(false), 2) + ' USD';
|
||||
$get('TxtImporte').value = FormatoNumero(ToDouble(ImporteDolares), 2);
|
||||
$get('LtlTotalMXN').value = FormatoNumero(ToDouble(ImporteDolares), 2);
|
||||
}
|
||||
|
||||
if ($get('TxtTotal') != null) {
|
||||
$get('TxtTotal').value = FormatoNumero(parseFloat($get('TxtImporte').value.replace(',', '')) + parseFloat($get('TxtOtrosImportes').value.replace(',', '') * -1), 2);
|
||||
}
|
||||
|
||||
if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(SumaValores(), 2);
|
||||
if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(SumaValores() - ((SumaValores() / 1.16)), 2);
|
||||
if ($get('ChkAbonoCuenta')) $get('ChkAbonoCuenta').checked = (parseFloat($get('TxtImporte').value.replace(/,/g, '')) > 2000);
|
||||
} else {
|
||||
SumaDolaresPesos(1);
|
||||
}
|
||||
|
||||
if ($get('TxtTotal') != null) {
|
||||
$get('TxtTotal').value = FormatoNumero(parseFloat($get('TxtImporte').value.replace(',', '')) + parseFloat($get('TxtOtrosImportes').value.replace(',', '') * -1), 2);
|
||||
}
|
||||
|
||||
if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(SumaValores(), 2);
|
||||
if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(SumaValores() - ((SumaValores() / 1.16)), 2);
|
||||
if ($get('ChkAbonoCuenta')) $get('ChkAbonoCuenta').checked = (parseFloat($get('TxtImporte').value.replace(/,/g, '')) > 2000);
|
||||
}
|
||||
|
||||
function CambiaDolaresPesos() {
|
||||
debugger;
|
||||
$get('TxtImporte').value = FormatoNumero(SumaValores(), 2);
|
||||
$('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2))
|
||||
if ('<%= Me.FiltrarCuentas.ToString() %>' == '1') {
|
||||
$get('TxtImporte').value = FormatoNumero(SumaValores(), 2);
|
||||
$('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2))
|
||||
|
||||
|
||||
if ($("#LbImporteMN").length) {
|
||||
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' MXN';
|
||||
$get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) / ToDouble($get('TxtTC').value), 2);
|
||||
$get('LtlTotalMXN').value = FormatoNumero(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTC').value), 2);
|
||||
}
|
||||
|
||||
if ($get('TxtTotal') != null) {
|
||||
$get('TxtTotal').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) + (ToDouble($get('TxtOtrosImportes').value.replace(',', '') * -1)), 2);
|
||||
}
|
||||
|
||||
if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(SumaValores(), 2);
|
||||
if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(SumaValores() - ((SumaValores() / 1.16)), 2);
|
||||
if ($get('ChkAbonoCuenta')) $get('ChkAbonoCuenta').checked = (parseFloat($get('TxtImporte').value.replace(/,/g, '')) > 2000);
|
||||
} else {
|
||||
SumaDolaresPesos(2);
|
||||
}
|
||||
}
|
||||
|
||||
function SumaDolaresPesos(cveMonedaPago) {
|
||||
|
||||
let ImporteSuma = parseFloat(SumaValores(false, cveMonedaPago));
|
||||
|
||||
$get('TxtImporte').value = FormatoNumero(ImporteSuma, 2);
|
||||
$('#LtlTotalMXN').text(FormatoNumero(ImporteSuma, 2))
|
||||
|
||||
debugger;
|
||||
if ($("#LbImporteMN").length) {
|
||||
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' MXN';
|
||||
$get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) / ToDouble($get('TxtTC').value), 2);
|
||||
$get('LtlTotalMXN').value = FormatoNumero(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTC').value), 2);
|
||||
|
||||
$get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')), 2);
|
||||
$get('LtlTotalMXN').value = FormatoNumero(ToDouble($get('TxtImporte').value), 2);
|
||||
|
||||
switch (cveMonedaPago) {
|
||||
case 1:
|
||||
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(ImporteSuma, 2) + ' MXN';
|
||||
break;
|
||||
case 2:
|
||||
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(ImporteSuma, 2) + ' USD';
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($get('TxtTotal') != null) {
|
||||
$get('TxtTotal').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) + (ToDouble($get('TxtOtrosImportes').value.replace(',', '') * -1)), 2);
|
||||
}
|
||||
|
||||
if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(SumaValores(), 2);
|
||||
if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(SumaValores() - ((SumaValores() / 1.16)), 2);
|
||||
if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(ImporteSuma, 2);
|
||||
if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(ImporteSuma - ((ImporteSuma / 1.16)), 2);
|
||||
if ($get('ChkAbonoCuenta')) $get('ChkAbonoCuenta').checked = (parseFloat($get('TxtImporte').value.replace(/,/g, '')) > 2000);
|
||||
|
||||
}
|
||||
@@ -790,7 +869,7 @@
|
||||
}
|
||||
|
||||
|
||||
function DescuenoMasivo(txt) {
|
||||
function DescuenoMasivo(txt) {
|
||||
$(".selDescuento").val(txt.value);
|
||||
$(".selDescuento").trigger("keyup");
|
||||
}
|
||||
|
||||
@@ -99,6 +99,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FiltrarCuentas As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("FiltrarCuentas")), 1, ViewState("FiltrarCuentas").ToString.ToEntero)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("FiltrarCuentas") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveMonedaFiltro As Integer
|
||||
Get
|
||||
Return ViewState("CveMonedaFiltro").ToString.ToEntero
|
||||
@@ -247,6 +255,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
CveClasificacionProveedor = IfNull(Request("CveClasificacion"), "-1").ToString.ToEntero
|
||||
CveMoneda = IfNull(Request("CveMoneda"), "-1").ToString.ToEntero
|
||||
CveMonedaFiltro = IfNull(Request("CveMoneda"), "-1").ToString.ToEntero
|
||||
FiltrarCuentas = IfNull(Request("FiltrarCuentas"), "1").ToString.ToEntero
|
||||
CveEstatus = IfNull(Request("CveEstatus"), "-1").ToString.ToEntero
|
||||
Serie = IfNull(Request("Serie"), "").ToString
|
||||
CveAplicaNC = IfNull(Request("CveAplicaNC"), "-1").ToString.ToEntero
|
||||
@@ -254,7 +263,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
CodigoProgramacion = IfNull(Request("CodigoProgramacion"), "-1").ToString
|
||||
CveSubProyectoFiltro = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero
|
||||
|
||||
|
||||
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1});", "TxtTotal", 0))
|
||||
|
||||
'proceso para que solo pague lo que este programada
|
||||
@@ -300,13 +308,25 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
LbTipoMoneda.Text = String.Format("Pago en {0}", GlobalDTMonedas.FiltraParametros(String.Format("CveMoneda = {0}", CveMoneda)).Rows(0)("Moneda"))
|
||||
End If
|
||||
|
||||
If CveMoneda = 2 Then
|
||||
ChkPagarPesos.Visible = True
|
||||
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||
'SI NO ES GDIAZ, NO PERMITIR LA MEZCLA DE CUENTAS
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) <> "1" AndAlso FiltrarCuentas = 0 Then
|
||||
FiltrarCuentas = 1
|
||||
End If
|
||||
|
||||
If FiltrarCuentas = 0 Then
|
||||
ChkPagarPesos.Visible = False
|
||||
ChkPagarDolares.Visible = False
|
||||
|
||||
CveMonedaFiltro = -1
|
||||
Else
|
||||
ChkPagarDolares.Visible = True
|
||||
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
||||
If CveMoneda = 2 Then
|
||||
ChkPagarPesos.Visible = True
|
||||
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||
Else
|
||||
ChkPagarDolares.Visible = True
|
||||
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
||||
End If
|
||||
End If
|
||||
|
||||
RegistraScript($"TipoCambioActual = {GlobalTipoCambio(NowADS()).FormatoNumero(4)}")
|
||||
@@ -324,7 +344,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
If UsuarioActual.TienePermisoProceso(361) Then
|
||||
'GvCxP.Columns(11).Visible = True
|
||||
chkaplicaDescuento.Visible = True
|
||||
'chkaplicaDescuentoMasivo.Visible = True
|
||||
chkaplicaDescuentoMasivo.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -367,23 +387,27 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Private Sub CargaDatos(Optional tCveMoneda As Integer = -1) 'pCveProveedor As Integer, tCveMoneda As Integer, FechaVencimientoInicio As String, FechaVencimientoFin As String, CveUsuarioRegistro As Integer, CveUsuarioPrograma As Integer, Serie As String)
|
||||
If tCveMoneda = -1 Then tCveMoneda = CveMoneda
|
||||
|
||||
Dim Mov As New ClsMovimientos
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso FiltrarCuentas = 0 Then
|
||||
tCveMoneda = -1
|
||||
End If
|
||||
|
||||
TxtObservaciones.Text = ""
|
||||
TxtImporte.Text = ""
|
||||
TxtTotal.Text = ""
|
||||
|
||||
If Mov.GetCxPProveedor(CveProveedor, FechaI, FechaF, CveUsuarioProgramo, CveUsuarioRegistro, CveUsuarioResponsable, CveClasificacionProveedor, tCveMoneda, CveEstatus, CveProveedorSucursal, CveAplicaNC, "-1", "-1", CodigoProgramacion, CveSubProyecto:=CveSubProyectoFiltro) Then
|
||||
DtDatos = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
|
||||
Dim ObjMov As New ClsMovimientos
|
||||
If ObjMov.GetCxPProveedor(CveProveedor, FechaI, FechaF, CveUsuarioProgramo, CveUsuarioRegistro, CveUsuarioResponsable, CveClasificacionProveedor, tCveMoneda, CveEstatus, CveProveedorSucursal, CveAplicaNC, "-1", "-1", CodigoProgramacion, CveSubProyecto:=CveSubProyectoFiltro) Then
|
||||
DtDatos = ObjMov.DtResultados.FiltraParametros("CveCompra > 0 AND Saldo > 0", "Fecha,SerieFolio")
|
||||
GvCxP.DataSource = DtDatos
|
||||
DtDatos.Columns.Add("Movimiento")
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
DVBusqueda.Visible = True
|
||||
DtDatos.Rows(0)("Movimiento") = "FACTURA DE ACREEDOR"
|
||||
End If
|
||||
|
||||
End If
|
||||
ObjMov.Dispose()
|
||||
|
||||
|
||||
Mov.Dispose()
|
||||
GvCxP.DataBind()
|
||||
UPCompras.Update()
|
||||
UpBusqueda.Update()
|
||||
@@ -473,6 +497,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
e.Row.FCLiteral("LtlFactura").Text = e.Row.DBCampo("Folio")
|
||||
End If
|
||||
|
||||
e.Row.FCTextBox("TxtAbonar").Attributes.Add("CveMoneda", e.Row.DBCampo("CveMoneda"))
|
||||
|
||||
If e.Row.DBCampo("CveCompra").ToEntero > 0 Then
|
||||
|
||||
Dim FiltroInv As String = ""
|
||||
@@ -643,6 +669,10 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Dim ValidaSAT As Boolean = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(529) = "1" OrElse ChkNoValidaSAT.Checked Then ValidaSAT = False
|
||||
|
||||
If Not EsProduccion Then
|
||||
ValidaSAT = False
|
||||
End If
|
||||
|
||||
If ValidaSAT Then
|
||||
Dim Validada As Boolean = False
|
||||
Dim MsgValidadas As New StringBuilder
|
||||
@@ -1117,18 +1147,22 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
DdlCuenta.Items.Clear()
|
||||
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
|
||||
If ChkPagarPesos.Checked Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
|
||||
RegistraScript("CambiaPesosDolares();")
|
||||
ElseIf ChkPagarDolares.Checked Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 2))
|
||||
RegistraScript("CambiaDolaresPesos();")
|
||||
Else
|
||||
If CveMonedaFiltro > 0 Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", CveMonedaFiltro))
|
||||
If FiltrarCuentas = 1 Then
|
||||
If ChkPagarPesos.Checked Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
|
||||
RegistraScript("CambiaPesosDolares();")
|
||||
ElseIf ChkPagarDolares.Checked Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 2))
|
||||
RegistraScript("CambiaDolaresPesos();")
|
||||
Else
|
||||
If CveMonedaFiltro > 0 Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", CveMonedaFiltro))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If TipoPago = 3 Then
|
||||
dt = dt.FiltraParametros("CveTipoCuenta = 7")
|
||||
End If
|
||||
@@ -1148,8 +1182,32 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlCuenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuenta.SelectedIndexChanged
|
||||
'recargo la moneda con la que se va a pagar
|
||||
Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta = {0}", DdlCuenta.SelectedValue))
|
||||
|
||||
If FiltrarCuentas = 0 Then
|
||||
|
||||
If dr("CveMoneda").ToString() = "2" Then
|
||||
ChkPagarDolares.Visible = True
|
||||
ChkPagarDolares.Checked = True
|
||||
ChkPagarDolares.Enabled = False
|
||||
|
||||
ChkPagarPesos.Visible = False
|
||||
ChkPagarPesos.Checked = False
|
||||
Else
|
||||
ChkPagarPesos.Visible = True
|
||||
ChkPagarPesos.Checked = True
|
||||
ChkPagarPesos.Enabled = False
|
||||
|
||||
ChkPagarDolares.Visible = False
|
||||
ChkPagarDolares.Checked = False
|
||||
End If
|
||||
|
||||
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||
End If
|
||||
|
||||
'recargo la moneda con la que se va a pagar
|
||||
|
||||
If dr IsNot Nothing Then
|
||||
TxtFechaDocumento.Attributes.Remove("onchange")
|
||||
UpDatos.Update()
|
||||
@@ -1673,11 +1731,17 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Protected Sub chkaplicaDescuento_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
GvCxP.Columns(11).Visible = chkaplicaDescuento.Checked
|
||||
TxtDescuenoMasivo.Visible = chkaplicaDescuento.Checked
|
||||
UPCompras.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub chkaplicaDescuentoMasivo_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
GvCxP.Columns(11).Visible = chkaplicaDescuentoMasivo.Checked
|
||||
TxtDescuenoMasivo.Visible = chkaplicaDescuentoMasivo.Checked
|
||||
UPCompras.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub tmpValida()
|
||||
|
||||
Dim ValidaSAT As Boolean = True
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.dashboard-stat2 {
|
||||
padding: 1px 2px 15px 10px;
|
||||
}
|
||||
.dashboard-stat2 {
|
||||
padding: 1px 2px 15px 10px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
@@ -42,7 +42,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-1">Proveedor:</div>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
<%--<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlProveedores" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
@@ -194,21 +194,28 @@
|
||||
<asp:ListItem Selected="False" Text="Ambos" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-3" id="DivVerPesos" runat="server" visible="false">
|
||||
<div style="display: flex; align-items: center;">
|
||||
Ver en pesos:
|
||||
<asp:CheckBox ID="ChkVerEnPesos" data-size="small" CssClass="chksino" Style="margin-top: -2px; background-color: #fff;" runat="server" Text=" " AutoPostBack="False" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel UpdateMode="Conditional" ID="UpIndicadores" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="dvIndicadores" visible="false">
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="dashboard-stat2 " style=" border-style: solid; border-color: whitesmoke; padding-top px;">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h3 class="font-red-haze">
|
||||
<span data-counter="counterup" data-value="1349"><asp:Literal runat="server" ID="LtlTotalOriginal"></asp:Literal></span>
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<asp:Literal runat="server" ID="LtlTotalOriginal"></asp:Literal></span>
|
||||
<small class="font-red-haze">$</small>
|
||||
</h3>
|
||||
<small>TOTAL ORIGINAL</small>
|
||||
@@ -218,21 +225,24 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="status" style="font-size:12px">
|
||||
MXN: <asp:Literal Text="text" ID="LtlTotalMXN" runat="server" />
|
||||
<div class="status" style="font-size: 12px">
|
||||
MXN:
|
||||
<asp:Literal Text="text" ID="LtlTotalMXN" runat="server" />
|
||||
</div>
|
||||
<div class="status" style="font-size:12px">
|
||||
Dólares: <asp:Literal Text="text" ID="LtlTotalDolares" runat="server" />
|
||||
<div class="status" style="font-size: 12px">
|
||||
Dólares:
|
||||
<asp:Literal Text="text" ID="LtlTotalDolares" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="dashboard-stat2 " style=" border-style: solid; border-color: whitesmoke; padding: 5px 5px 25px 5px;">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding: 5px 5px 25px 5px;">
|
||||
<div class="display">
|
||||
<div class="number">
|
||||
<h3 class="font-green-sharp" >
|
||||
<span data-counter="counterup" data-value="7800"><asp:Literal runat="server" ID="LtlTotalAbonado"></asp:Literal></span>
|
||||
<h3 class="font-green-sharp">
|
||||
<span data-counter="counterup" data-value="7800">
|
||||
<asp:Literal runat="server" ID="LtlTotalAbonado"></asp:Literal></span>
|
||||
<small class="font-green-sharp">$</small>
|
||||
</h3>
|
||||
<small>ABONADO</small>
|
||||
@@ -258,11 +268,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="dashboard-stat2 " style=" border-style: solid; border-color: whitesmoke;">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h3 class="font-blue-sharp">
|
||||
<span data-counter="counterup" data-value="1349"><asp:Literal ID="TotalPendiente" runat="Server" ></asp:Literal></span>
|
||||
<h3 class="font-blue-sharp">
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<asp:Literal ID="TotalPendiente" runat="Server"></asp:Literal></span>
|
||||
<small class="font-blue-sharp">$</small>
|
||||
</h3>
|
||||
<small>SALDO PENDIENTE</small>
|
||||
@@ -272,11 +283,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="status" style="font-size:12px">
|
||||
MXN: <asp:Literal Text="text" ID="LtlPendiente" runat="server" />
|
||||
<div class="status" style="font-size: 12px">
|
||||
MXN:
|
||||
<asp:Literal Text="text" ID="LtlPendiente" runat="server" />
|
||||
</div>
|
||||
<div class="status" style="font-size:12px">
|
||||
DÓLARES <asp:Literal Text="text" ID="LtlPendienteDolares" runat="server" />
|
||||
<div class="status" style="font-size: 12px">
|
||||
DÓLARES
|
||||
<asp:Literal Text="text" ID="LtlPendienteDolares" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -303,7 +316,7 @@
|
||||
<asp:HyperLink ID="Hpl" runat="server" NavigateUrl='<%#String.Format("/Compras/Proveedores.aspx?CveProveedor={0}&Opt=3&CveProveedorSucursal={1}&CveMoneda={2}", Eval("CveProveedor"), Eval("CveProveedorSucursal"), Eval("CveMoneda"))%>' Text='<%# Eval("RazonSocial") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ControlStyle CssClass="Texto" />
|
||||
<ItemStyle HorizontalAlign="Left" width="300px"/>
|
||||
<ItemStyle HorizontalAlign="Left" Width="300px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
@@ -312,17 +325,17 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitFact" runat="server" Text='<%# Bind("NumFacturas") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="60px" HorizontalAlign="Center" />
|
||||
<ItemStyle Width="60px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Venci.
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate >
|
||||
<asp:Literal ID="LitUltimoVencimiento" runat="server" Text='<%# Bind("UltimoVencimiento")%>'></asp:Literal>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitUltimoVencimiento" runat="server" Text='<%# Bind("UltimoVencimiento")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="70px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<ItemStyle Width="70px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Original
|
||||
@@ -330,9 +343,9 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitOriginal" runat="server" Text='<%# Bind("Original", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right"/>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Datafield="Abreviatura" HeaderText="Moneda" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="40px"/>
|
||||
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="40px" />
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Abonado
|
||||
@@ -349,7 +362,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitPorPagado" runat="server" Text='<%# Bind("PorPagado", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="40px" HorizontalAlign="Center" />
|
||||
<ItemStyle Width="40px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="False">
|
||||
<HeaderTemplate>
|
||||
@@ -358,7 +371,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitImporteProgramo" runat="server" Text='<%# Bind("ImporteProgramo", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Center" />
|
||||
<ItemStyle Width="100px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
@@ -367,7 +380,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitSaldo" runat="server" Text='<%# Bind("Saldo", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" Font-Bold="True" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="100px" Font-Bold="True" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
@@ -376,20 +389,19 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitPorXPagar" runat="server" Text='<%# Bind("PorXPagar", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="40px" HorizontalAlign="Center" />
|
||||
<ItemStyle Width="40px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="False" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Abonar</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<%--<asp:Image ID="ImgAbonar" runat="server" ImageUrl="~/Imagenes/Money_add.png" AlternateText="Registrar Pago/Abono" Style="cursor:pointer;" />--%>
|
||||
<asp:HyperLink ID="ImgAbonar" CssClass="Texto" runat="server" NavigateUrl='<%# Eval("CveProveedor", "/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}") %>' ToolTip="Registrar Pago/Abono"><i class='fa fa-money font-green'></i></asp:HyperLink>
|
||||
<asp:HyperLink ID="ImgAbonar" CssClass="Texto" runat="server" NavigateUrl='<%# Eval("CveProveedor", "/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}") %>' ToolTip="Registrar Pago/Abono"><i class='fa fa-money font-green'></i></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="70px" HorizontalAlign="Center" />
|
||||
<ItemStyle Width="70px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%--<asp:BoundField Datafield="Moneda" HeaderText="Moneda" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10px"/>--%>
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
|
||||
@@ -31,6 +31,11 @@ Partial Class Bancos_RepProveedoresPagos
|
||||
GvCxP.Columns(10).Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
chkexpand.Checked = True
|
||||
DivVerPesos.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -103,7 +108,7 @@ Partial Class Bancos_RepProveedoresPagos
|
||||
GvCxP.Columns(7).Visible = ChkProgramadas.Checked 'AndAlso DdlUsuarioProgramo.SelectedValue.ToEntero > 0
|
||||
|
||||
|
||||
If Mov.GetCxPEmpresa(DdlProveedores.SelectedValue.ToEntero, FechaI, FechaF, DdlSubProyecto.SelectedValue.ToEntero, -1, DdlUsuarioRegistro.SelectedValue.ToEntero, CveUsuarioProgramo, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, -1, DdlEstatusCompra.SelectedValue.ToEntero, AplicaNC.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaVI, FechaVF, CodigoProgramacion, DdlTipoProveedor.SelectedValue.ToEntero) Then
|
||||
If Mov.GetCxPEmpresa(DdlProveedores.SelectedValue.ToEntero, FechaI, FechaF, DdlSubProyecto.SelectedValue.ToEntero, -1, DdlUsuarioRegistro.SelectedValue.ToEntero, CveUsuarioProgramo, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, -1, DdlEstatusCompra.SelectedValue.ToEntero, AplicaNC.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaVI, FechaVF, CodigoProgramacion, DdlTipoProveedor.SelectedValue.ToEntero, VerEnPesos:=ChkVerEnPesos.Checked) Then
|
||||
|
||||
GvCxP.DataSource = Mov.DtResultados
|
||||
If Mov.DtResultados IsNot Nothing AndAlso Mov.DtResultados.Rows.Count > 0 Then
|
||||
@@ -162,7 +167,13 @@ Partial Class Bancos_RepProveedoresPagos
|
||||
CveUsuarioProgramo = DdlUsuarioProgramo.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}&CveSubProyecto={13}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue, DdlSubProyecto.SelectedValue)
|
||||
Dim FiltrarCuentas As Integer = 1
|
||||
|
||||
If ChkVerEnPesos.Checked Then
|
||||
FiltrarCuentas = 0
|
||||
End If
|
||||
|
||||
e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}&CveSubProyecto={13}&FiltrarCuentas={14}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue, DdlSubProyecto.SelectedValue, FiltrarCuentas)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAutorizacion,CveCliente,CveVendedor,Importe,TipoAutorizacion,Saldo,LimiteCredito,DiasVencidos,DiasVencidosAutorizacion"
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAutorizacion,CveCliente,CveVendedor,Importe,TipoAutorizacion,Saldo,LimiteCredito,DiasVencidos,DiasVencidosAutorizacion,TipoDocumento"
|
||||
EmptyDataText="No se encontraron autorizaciones" ToolTip=""
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" Width="100%" GridLines="None">
|
||||
<Columns>
|
||||
@@ -169,54 +169,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="portlet light xspadding traspasorow bordered" id="DivAntNCIxC" runat="server" visible="false">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<span class="caption-subject bold uppercase" style="line-height: 1; color: #ff6000;">Anticipos, notas de crédito e ingresos por comprobar</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusquedaAnt" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnt','{0}')", GVAnticipos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnt','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GVAnticipos" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" GridLines="None" DataKeyNames="CveIE,Folio,Tipo,CveVenta,CveCliente" Style="text-align: center; min-width: 783px; width: 100%;">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="NombreComercial" DataFormatString="{0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40%" />
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFactura" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Tipo" DataField="Tipo" DataFormatString="{0}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Saldo" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblEstatus" Text='<%# Eval("EstatusTexto") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Acciones" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkAutorizar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ToolTip="Autorizar Anticipo" runat="server" OnClick="LnkAutorizarAnticipo_Click" />
|
||||
<asp:LinkButton ID="LnkCancelar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-ban'></i>" ToolTip="Bloquear Anticipo" runat="server" OnClick="LnkCancelarAnticipo_Click" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="DModal" class="modal ADS fade" role="dialog">
|
||||
|
||||
@@ -62,10 +62,6 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
|
||||
DdlEstatus.SelectedValue = "0"
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
DivAntNCIxC.Visible = True
|
||||
End If
|
||||
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
@@ -87,10 +83,6 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
ObjGral.Dispose()
|
||||
GvDatos.DataBind()
|
||||
|
||||
If DivAntNCIxC.Visible Then
|
||||
CargaAnticipos(CveCliente, FechaI, FechaF)
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
@@ -225,6 +217,10 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
'cuando es la modalidad 3, es autorización directa sobre la venta ya asociada a la solicitud.
|
||||
If UsuarioActual.Empresa.Funcionalidad(595) = "3" Then CveEstatusAutorizacion = 2
|
||||
|
||||
If gvRow.DataKey("TipoDocumento") = "Anticipo" Then
|
||||
CveEstatusAutorizacion = 1
|
||||
End If
|
||||
|
||||
Dim Importe As Decimal = gvRow.DataKey("Importe").ToDecimal().RoundSQL(2)
|
||||
'AUTORIZACION DE IMPORTE,
|
||||
'el cliente limite de 500, y saldo de 501. autorización que puede autorizar no puede ser mayor a 49 ( limite * 1.% - Saldo)
|
||||
@@ -376,130 +372,4 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub CargaAnticipos(CveCliente As Integer, FechaI As DateTime, FechaF As DateTime)
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetAnticiposNCIxCAutorizaciones(CveCliente, UsuarioActual.CveEmpresa, FechaI, FechaF) Then
|
||||
GVAnticipos.DataSource = ObjMovtos.DtResultados
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
GVAnticipos.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAutorizarAnticipo_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||
Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
|
||||
Dim CveCliente = GvRow.DataKey("CveCliente").ToEntero()
|
||||
|
||||
If CveVenta > 0 OrElse CveIE > 0 Then
|
||||
Dim Actualizo As Boolean = False
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
|
||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then
|
||||
Alert("El anticipo se autorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
|
||||
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, True) Then
|
||||
Alert("El anticipo se autorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
If Actualizo Then
|
||||
Dim ObjEventoBitacora As New ClsOIEventos
|
||||
ObjEventoBitacora.AddEventoBitacora($"El anticipo se autorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1)
|
||||
ObjEventoBitacora.Dispose()
|
||||
End If
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCancelarAnticipo_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||
Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
|
||||
Dim CveCliente = GvRow.DataKey("CveCliente").ToEntero()
|
||||
|
||||
If CveVenta > 0 OrElse CveIE > 0 Then
|
||||
Dim Actualizo As Boolean = False
|
||||
Using ObjVentas As New ClsVentas
|
||||
If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
|
||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
|
||||
Alert("El anticipo se desautorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
|
||||
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
|
||||
Alert("El anticipo se desautorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
If Actualizo Then
|
||||
Dim ObjEventoBitacora As New ClsOIEventos
|
||||
ObjEventoBitacora.AddEventoBitacora($"El anticipo se desautorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1)
|
||||
ObjEventoBitacora.Dispose()
|
||||
End If
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GVAnticipos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAnticipos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim AnticipoAutorizado = CBool(e.Row.DBCampo("AnticipoAutorizado"))
|
||||
|
||||
If AnticipoAutorizado Then
|
||||
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-success"
|
||||
Else
|
||||
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-danger"
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("CveIE").ToString().ToEntero() > 0 Then
|
||||
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", e.Row.DataKey("CveIE"), e.Row.DataKey("Folio"))
|
||||
Else
|
||||
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a>", e.Row.DataKey("CveVenta"), e.Row.DataKey("Folio"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(379) Then
|
||||
If e.Row.DBCampo("CveVenta").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("NC", "Ant") Then
|
||||
If Not AnticipoAutorizado Then
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = False
|
||||
Else
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveIE").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("IxC") Then
|
||||
If Not AnticipoAutorizado Then
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = False
|
||||
Else
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -2342,12 +2342,12 @@
|
||||
<asp:HyperLink ID="HLDevolverDinero" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-usd'></i>" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Autorización" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<%-- <asp:TemplateField HeaderText="Autorización" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkAutorizar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ToolTip="Autorizar Anticipo" runat="server" OnClick="LnkAutorizarAnticipo_Click" />
|
||||
<asp:LinkButton ID="LnkCancelar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-ban'></i>" ToolTip="Bloquear Anticipo" runat="server" OnClick="LnkCancelarAnticipo_Click" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
@@ -1946,9 +1946,9 @@ Partial Class Clientes
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) Then
|
||||
GVAnticipos.Columns(7).Visible = True
|
||||
End If
|
||||
'If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) Then
|
||||
' GVAnticipos.Columns(7).Visible = True
|
||||
'End If
|
||||
|
||||
GVAnticipos.DataBind()
|
||||
GVAnticiposHistorial.DataBind()
|
||||
@@ -10753,82 +10753,82 @@ Partial Class Clientes
|
||||
|
||||
End Function
|
||||
|
||||
Protected Sub LnkAutorizarAnticipo_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||
Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
|
||||
'Protected Sub LnkAutorizarAnticipo_Click(sender As Object, e As EventArgs)
|
||||
' Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
' Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||
' Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
|
||||
|
||||
If CveVenta > 0 OrElse CveIE > 0 Then
|
||||
Dim Actualizo As Boolean = False
|
||||
' If CveVenta > 0 OrElse CveIE > 0 Then
|
||||
' Dim Actualizo As Boolean = False
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
|
||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then
|
||||
Alert("El anticipo se autorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
|
||||
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, True) Then
|
||||
Alert("El anticipo se autorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
' Using ObjVentas As New ClsVentas
|
||||
' If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
|
||||
' If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then
|
||||
' Alert("El anticipo se autorizó correctamente")
|
||||
' Actualizo = True
|
||||
' End If
|
||||
' ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
|
||||
' If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, True) Then
|
||||
' Alert("El anticipo se autorizó correctamente")
|
||||
' Actualizo = True
|
||||
' End If
|
||||
' End If
|
||||
' End Using
|
||||
|
||||
If Actualizo Then
|
||||
Dim ObjEventoBitacora As New ClsOIEventos
|
||||
If ObjEventoBitacora.AddEventoBitacora($"El anticipo se autorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
|
||||
GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
End If
|
||||
ObjEventoBitacora.Dispose()
|
||||
GvEB.DataBind()
|
||||
' If Actualizo Then
|
||||
' Dim ObjEventoBitacora As New ClsOIEventos
|
||||
' If ObjEventoBitacora.AddEventoBitacora($"El anticipo se autorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
|
||||
' GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
' End If
|
||||
' ObjEventoBitacora.Dispose()
|
||||
' GvEB.DataBind()
|
||||
|
||||
UPEventoBitacora.Update()
|
||||
CargaEventoBitacora()
|
||||
End If
|
||||
' UPEventoBitacora.Update()
|
||||
' CargaEventoBitacora()
|
||||
' End If
|
||||
|
||||
End If
|
||||
' End If
|
||||
|
||||
CargaAnticipos()
|
||||
End Sub
|
||||
' CargaAnticipos()
|
||||
'End Sub
|
||||
|
||||
Protected Sub LnkCancelarAnticipo_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||
Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
|
||||
'Protected Sub LnkCancelarAnticipo_Click(sender As Object, e As EventArgs)
|
||||
' Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
' Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||
' Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
|
||||
|
||||
If CveVenta > 0 OrElse CveIE > 0 Then
|
||||
Dim Actualizo As Boolean = False
|
||||
Using ObjVentas As New ClsVentas
|
||||
If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
|
||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
|
||||
Alert("El anticipo se desautorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
|
||||
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
|
||||
Alert("El anticipo se desautorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
CargaAnticipos()
|
||||
' If CveVenta > 0 OrElse CveIE > 0 Then
|
||||
' Dim Actualizo As Boolean = False
|
||||
' Using ObjVentas As New ClsVentas
|
||||
' If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
|
||||
' If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
|
||||
' Alert("El anticipo se desautorizó correctamente")
|
||||
' Actualizo = True
|
||||
' End If
|
||||
' ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
|
||||
' If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
|
||||
' Alert("El anticipo se desautorizó correctamente")
|
||||
' Actualizo = True
|
||||
' End If
|
||||
' End If
|
||||
' End Using
|
||||
' CargaAnticipos()
|
||||
|
||||
If Actualizo Then
|
||||
Dim ObjEventoBitacora As New ClsOIEventos
|
||||
If ObjEventoBitacora.AddEventoBitacora($"El anticipo se desautorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
|
||||
GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
End If
|
||||
ObjEventoBitacora.Dispose()
|
||||
GvEB.DataBind()
|
||||
' If Actualizo Then
|
||||
' Dim ObjEventoBitacora As New ClsOIEventos
|
||||
' If ObjEventoBitacora.AddEventoBitacora($"El anticipo se desautorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
|
||||
' GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
' End If
|
||||
' ObjEventoBitacora.Dispose()
|
||||
' GvEB.DataBind()
|
||||
|
||||
UPEventoBitacora.Update()
|
||||
CargaEventoBitacora()
|
||||
End If
|
||||
' UPEventoBitacora.Update()
|
||||
' CargaEventoBitacora()
|
||||
' End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
' End If
|
||||
'End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -6624,7 +6624,7 @@ Partial Class PV
|
||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim,
|
||||
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero,
|
||||
TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim,
|
||||
DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, CvePrecioLista:=CvePrecioLista,
|
||||
DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", DdlMetodoCliente.SelectedValue.ToEntero(), DdlFormaCliente.SelectedValue.ToEntero(), CvePrecioLista:=CvePrecioLista,
|
||||
RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, CveRegimenFiscal:=CveRegimenFiscal, CveUsoCFDI:=CveUsoCFDI, Genero:=GeneroCliente) Then
|
||||
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
@@ -26,6 +26,18 @@ Partial Class Ventas_PVCobranza
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveVendedor As Integer
|
||||
Get
|
||||
If ViewState("CveVendedor") Is Nothing Then
|
||||
ViewState("CveVendedor") = -1
|
||||
End If
|
||||
Return ViewState("CveVendedor").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveVendedor") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveVentaCancelacion As Integer
|
||||
Get
|
||||
If ViewState("CveVentaCancelacion") Is Nothing Then
|
||||
@@ -999,6 +1011,8 @@ Partial Class Ventas_PVCobranza
|
||||
LtlTipoAnticipo.Text = ""
|
||||
HdnTipoAmortizacion.Value = ""
|
||||
CveCliente = -1
|
||||
CveVendedor = -1
|
||||
|
||||
|
||||
If TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
||||
TmpDTAnticiposNCIxCCliente.Clear()
|
||||
@@ -1988,17 +2002,16 @@ Partial Class Ventas_PVCobranza
|
||||
DdlTipoAmortizacionAnticipo_SelectedIndexChanged(DdlTipoAmortizacionAnticipo, EventArgs.Empty)
|
||||
End If
|
||||
|
||||
If CveCliente <= 0 Then
|
||||
Dim DbRowVenta As DataRow = Nothing
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
Dim DbRowVenta As DataRow = Nothing
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DbRowVenta IsNot Nothing Then
|
||||
CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
|
||||
End If
|
||||
If DbRowVenta IsNot Nothing Then
|
||||
CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
|
||||
CveVendedor = DbRowVenta("CveVendedor").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
If CveCliente > 0 Then
|
||||
@@ -2154,6 +2167,19 @@ Partial Class Ventas_PVCobranza
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim CveVenta As Integer = gvr.DataKey("CveVenta").ToEntero()
|
||||
Dim CveIE As Integer = gvr.DataKey("CveIE").ToEntero()
|
||||
|
||||
Dim ObjVta As New ClsVentas
|
||||
If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, gvr.DataKey("CveCliente").ToEntero(), CveVendedor, Importe, 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then
|
||||
Dim msgAlert = "La autorización se agregó correctamente."
|
||||
If EnvioMsg Then
|
||||
msgAlert = $"{msgAlert} Se envió una notificación de autorización a los usuarios"
|
||||
End If
|
||||
Alert(msgAlert, TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjVta.Dispose()
|
||||
|
||||
|
||||
UpAnticipos.Update()
|
||||
End Sub
|
||||
@@ -2320,20 +2346,19 @@ Partial Class Ventas_PVCobranza
|
||||
DivConceptoNC.Visible = False
|
||||
End If
|
||||
|
||||
If CveCliente <= 0 Then
|
||||
Dim CveVenta As Integer = HdnCveVenta.Value.ToEntero
|
||||
Dim DbRowVenta As DataRow = Nothing
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DbRowVenta IsNot Nothing Then
|
||||
CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
Dim CveVenta As Integer = HdnCveVenta.Value.ToEntero
|
||||
Dim DbRowVenta As DataRow = Nothing
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DbRowVenta IsNot Nothing Then
|
||||
CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
|
||||
CveVendedor = DbRowVenta("CveVendedor").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
|
||||
If CveCliente > 0 Then
|
||||
CargaAnticipos(CveCliente)
|
||||
|
||||
@@ -12072,6 +12072,10 @@ Partial Class Ventas
|
||||
ObjFacturaBonificacion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
||||
ObjFacturaBonificacion.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
||||
|
||||
'CLIENTE
|
||||
ObjFacturaBonificacion.CveCliente = CveCliente
|
||||
ObjFacturaBonificacion.SetCliente()
|
||||
|
||||
ObjFacturaBonificacion.CveMetodoPago = 1
|
||||
ObjFacturaBonificacion.MetodoPago = "Pago en una sola exhibición"
|
||||
ObjFacturaBonificacion.ClaveMetodoPagoSAT = "PUE"
|
||||
@@ -12217,10 +12221,6 @@ Partial Class Ventas
|
||||
|
||||
ObjFacturaBonificacion.DtFirmas = DTmpF
|
||||
|
||||
'CLIENTE
|
||||
ObjFacturaBonificacion.CveCliente = CveCliente
|
||||
ObjFacturaBonificacion.SetCliente()
|
||||
|
||||
''SUCURSAL
|
||||
'ObjFacturaBonificacion.CveSucursal = DdlSucursal.SelectedValue.ToEntero()
|
||||
'ObjFacturaBonificacion.SetSucursalMatriz(Me)
|
||||
@@ -12550,6 +12550,15 @@ Partial Class Ventas
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.FechaVencimiento = TxtFechaPago.Text.ToDate
|
||||
|
||||
'CLIENTE
|
||||
ObjFactura.CveCliente = CveCliente
|
||||
ObjFactura.SetCliente()
|
||||
ObjFactura.CveEmpresaCRM = CveEmpresaCRM
|
||||
If CveCliente = -1 And CveEmpresaCRM > 0 Then
|
||||
ObjFactura.Cliente.Nombre = LblEmpresaCRM.Text
|
||||
ObjFactura.Cliente.RFC = LblRFCCRM.Text
|
||||
End If
|
||||
|
||||
ObjFactura.CveMetodoPago = DdlMetodoPago33.SelectedValue.ToEntero()
|
||||
ObjFactura.MetodoPago = If(DdlMetodoPago33.SelectedValue.ToEntero() > 0, DdlMetodoPago33.SelectedItem.Text, "")
|
||||
'ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {DdlMetodoPago33.SelectedValue}")
|
||||
@@ -12996,15 +13005,6 @@ Partial Class Ventas
|
||||
ObjFactura.DtDetalle = TmpDT.Copy
|
||||
ObjFactura.DtFirmas = DTmpF.Copy
|
||||
|
||||
'CLIENTE
|
||||
ObjFactura.CveCliente = CveCliente
|
||||
ObjFactura.SetCliente()
|
||||
ObjFactura.CveEmpresaCRM = CveEmpresaCRM
|
||||
If CveCliente = -1 And CveEmpresaCRM > 0 Then
|
||||
ObjFactura.Cliente.Nombre = LblEmpresaCRM.Text
|
||||
ObjFactura.Cliente.RFC = LblRFCCRM.Text
|
||||
End If
|
||||
|
||||
'SUCURSAL
|
||||
'ObjFactura.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
ObjFactura.SetSubProyectoMatriz(Me)
|
||||
@@ -13289,6 +13289,10 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
||||
ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
||||
|
||||
'CLIENTE
|
||||
ObjFacturaDevolucion.CveCliente = CveCliente
|
||||
ObjFacturaDevolucion.SetCliente()
|
||||
|
||||
ObjFacturaDevolucion.CveMetodoPago = DdlMetodoPago33.SelectedValue.ToEntero()
|
||||
ObjFacturaDevolucion.MetodoPago = If(DdlMetodoPago33.SelectedValue.ToEntero() > 0, DdlMetodoPago33.SelectedItem.Text, "")
|
||||
|
||||
@@ -13479,10 +13483,6 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.DtDetalle = TmpDT
|
||||
ObjFacturaDevolucion.DtFirmas = DTmpF
|
||||
|
||||
'CLIENTE
|
||||
ObjFacturaDevolucion.CveCliente = CveCliente
|
||||
ObjFacturaDevolucion.SetCliente()
|
||||
|
||||
'SUCURSAL
|
||||
ObjFacturaDevolucion.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
ObjFacturaDevolucion.SetSubProyectoMatriz(Me)
|
||||
@@ -40681,14 +40681,9 @@ Partial Class Ventas
|
||||
|
||||
'GvExist.Columns(0).ItemStyle.Width = New Unit(200, UnitType.Pixel)
|
||||
'ORDENA HACIA LA DERECHA LAS CANTIDAD - OJO!! NO SE USO GV.COLUMNS.COUNT PORQUE LAS COLUMNAS GENERADAS EN BEHIND NO LAS RECONOCE
|
||||
For index As Integer = 0 To DtExistencias.Columns.Count - 1
|
||||
For index As Integer = 1 To DtExistencias.Columns.Count - 1
|
||||
For Each gvr As GridViewRow In GvExist.Rows
|
||||
If index = 0 Then
|
||||
gvr.Cells(index).CssClass = "titulops"
|
||||
Else
|
||||
gvr.Cells(index).HorizontalAlign = HorizontalAlign.Right
|
||||
End If
|
||||
|
||||
gvr.Cells(index).HorizontalAlign = HorizontalAlign.Right
|
||||
Next
|
||||
Next
|
||||
End If
|
||||
@@ -40696,5 +40691,12 @@ Partial Class Ventas
|
||||
RegistraScript("$('#DivModalExistenciaTotal').modal('show');")
|
||||
UPExist.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvExist_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvExist.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.Header OrElse e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.Cells(0).Attributes.Add("colspan", "3")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user