Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1437,7 +1437,7 @@ Public Class ClsMovimientos
|
|||||||
Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
|
Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||||
Optional CveBanco As Integer = -1, Optional CveCuenta As Integer = -1,
|
Optional CveBanco As Integer = -1, Optional CveCuenta As Integer = -1,
|
||||||
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1,
|
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1,
|
||||||
Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = Nothing, Optional FechaAplicadoF As Date = Nothing) As Boolean
|
Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = MinFecha, Optional FechaAplicadoF As Date = MaxFecha) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_RepRecuperacion")
|
DataAdapter("PA_Vta_RepRecuperacion")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|||||||
@@ -140,43 +140,62 @@
|
|||||||
<div class="col-md-2" runat="server" id="DivFaltante">
|
<div class="col-md-2" runat="server" id="DivFaltante">
|
||||||
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante"/>
|
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3" id="DivComision" style="display: none">
|
<div class="col-md-2" id="DivComision" style="display: none">
|
||||||
<label style="width: 105px; ">Importe:</label>
|
<label>Importe:</label>
|
||||||
<asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="75px"></asp:TextBox>
|
<asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-1" id="DivIVA" style="display: none">
|
||||||
|
<label>IVA:</label>
|
||||||
|
<asp:TextBox runat="server" ID="TxtIVA" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3" style="display: none" id="divSubProyecto">
|
||||||
|
<label class="col-md-1 truncate" style="width: 110px; display: none" id="LblSubproyecto" >SubProyecto:</label>
|
||||||
|
|
||||||
<label class="col-md-1 truncate" style="width: 120px; display: none" id="LblSubproyecto" >SubProyecto:</label>
|
|
||||||
<div class="col-md-2" style="display: none" id="divSubProyecto">
|
|
||||||
<asp:DropDownList ID="DdlSubProyectoDeposito" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
<asp:DropDownList ID="DdlSubProyectoDeposito" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="col-md-1 truncate" style="width: 120px; display: none" id="LblClasificacion">Clasificación:</label>
|
<div class="col-md-4" style="display: none" id="divClasificacion">
|
||||||
<div class="col-md-2" style="display: none" id="divClasificacion">
|
|
||||||
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" CssClass=" form-control input-sm select2me" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
<label class="col-md-1 truncate" style="width: 110px;" id="LblClasificacion">Clasificación:</label>
|
||||||
|
|
||||||
|
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2" runat="server" id="Div1">
|
<div class="col-md-2" runat="server" id="Div1">
|
||||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento"/>
|
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3" id="DivDescuento" style="display: none">
|
<div class="col-md-3" id="DivDescuento" style="display: none">
|
||||||
<label style="width: 105px; ">Importe:</label>
|
<label>Importe:</label>
|
||||||
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="75px"></asp:TextBox>
|
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="col-md-1 truncate" style="width: 120px; display: none" id="LblSubproyectoDescuento" >SubProyecto:</label>
|
<div class="col-md-3" style="display: none" id="divSubProyectoDescuento">
|
||||||
<div class="col-md-2" style="display: none" id="divSubProyectoDescuento">
|
<label class="col-md-1 truncate" style="width: 110px; display: none" id="LblSubproyectoDescuento" >SubProyecto:</label>
|
||||||
|
|
||||||
<asp:DropDownList ID="DdlSubProyectoDescuento" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
<asp:DropDownList ID="DdlSubProyectoDescuento" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4" style="display: none" id="divClasificacionDescuento">
|
||||||
|
|
||||||
|
<label class="col-md-1 truncate" style="width: 110px;" id="LblClasificacionDescuento">Clasificación:</label>
|
||||||
|
|
||||||
|
<asp:DropDownList ID="DdlClasificacionDescuento" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||||
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="col-md-1 truncate" style="width: 120px; display: none" id="LblClasificacionDescuento">Clasificación:</label>
|
|
||||||
<div class="col-md-2" style="display: none" id="divClasificacionDescuento">
|
|
||||||
<asp:DropDownList ID="DdlClasificacionDescuento" AutoPostBack="false" CssClass=" form-control input-sm select2me" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -295,6 +314,26 @@
|
|||||||
debugger;
|
debugger;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
//debugger;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var txtcomision = ToDouble($('#C_TxtIVA').val());
|
||||||
|
if (txtcomision != 0) {
|
||||||
|
var comisionNegativa = 0;
|
||||||
|
if (txtcomision < 0) {
|
||||||
|
comisionNegativa = txtcomision * -1;
|
||||||
|
}
|
||||||
|
if (comisionNegativa > saldo) {
|
||||||
|
$('#C_TxtIVA').val(0);
|
||||||
|
comision = 0;
|
||||||
|
descuento = 0;
|
||||||
|
txtcomision = 0;
|
||||||
|
alert("No es posible poner un importe IVA superior a lo seleccionado");
|
||||||
|
saldo = 0;
|
||||||
|
$('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2));
|
||||||
|
debugger;
|
||||||
|
} else {
|
||||||
|
|
||||||
//debugger;
|
//debugger;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -351,7 +390,25 @@
|
|||||||
}
|
}
|
||||||
if (comisionNegativa > ValorTotalSeleccionado) {
|
if (comisionNegativa > ValorTotalSeleccionado) {
|
||||||
$('#C_TxtDescuento').val(descuento)
|
$('#C_TxtDescuento').val(descuento)
|
||||||
alert("No es posible poner una comision superior a lo seleccionado")
|
alert("No es posible poner un descuento superior a lo seleccionado")
|
||||||
|
} else {
|
||||||
|
saldo = ValorTotalSeleccionado + comision2 + comision;
|
||||||
|
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||||
|
descuento = ToDouble($('#C_TxtDescuento').val())
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function txtSumaIVA(txt) {
|
||||||
|
var comision2 = ToDouble($('#C_TxtIVA').val());
|
||||||
|
var comisionNegativa = 0;
|
||||||
|
if (comision2 < 0) {
|
||||||
|
comisionNegativa = comision2 * -1;
|
||||||
|
}
|
||||||
|
if (comisionNegativa > ValorTotalSeleccionado) {
|
||||||
|
$('#C_TxtIVA').val(descuento)
|
||||||
|
alert("No es posible poner un IVA superior a lo seleccionado")
|
||||||
} else {
|
} else {
|
||||||
saldo = ValorTotalSeleccionado + comision2 + comision;
|
saldo = ValorTotalSeleccionado + comision2 + comision;
|
||||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||||
@@ -367,12 +424,16 @@
|
|||||||
$('#divSubProyecto').css("display", "block");
|
$('#divSubProyecto').css("display", "block");
|
||||||
$('#LblClasificacion').css("display", "block");
|
$('#LblClasificacion').css("display", "block");
|
||||||
$('#divClasificacion').css("display", "block");
|
$('#divClasificacion').css("display", "block");
|
||||||
|
$('#DivIVA').css("display", "block");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('#DivComision').css("display", "none");
|
$('#DivComision').css("display", "none");
|
||||||
$('#LblSubproyecto').css("display", "none");
|
$('#LblSubproyecto').css("display", "none");
|
||||||
$('#divSubProyecto').css("display", "none");
|
$('#divSubProyecto').css("display", "none");
|
||||||
$('#LblClasificacion').css("display", "none");
|
$('#LblClasificacion').css("display", "none");
|
||||||
$('#divClasificacion').css("display", "none");
|
$('#divClasificacion').css("display", "none");
|
||||||
|
$('#DivIVA').css("display", "none");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ Partial Class Bancos_DepositosCaja
|
|||||||
txtFechaF.Text = Now.ToShortDateString
|
txtFechaF.Text = Now.ToShortDateString
|
||||||
TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);")
|
TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);")
|
||||||
TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(event);")
|
TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(event);")
|
||||||
|
TxtIVA.Attributes.Add("onKeyUp", "txtSumaIVA(event);")
|
||||||
|
|
||||||
|
|
||||||
CargaCuentas()
|
CargaCuentas()
|
||||||
ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);")
|
ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);")
|
||||||
@@ -88,6 +90,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
Dim TotalImportePrePoliza As Decimal
|
Dim TotalImportePrePoliza As Decimal
|
||||||
Dim Comision As Decimal = TxtComision.Text.ToDecimal
|
Dim Comision As Decimal = TxtComision.Text.ToDecimal
|
||||||
Dim Descuento As Decimal = TxtDescuento.Text.ToDecimal
|
Dim Descuento As Decimal = TxtDescuento.Text.ToDecimal
|
||||||
|
Dim IVA As Decimal = TxtIVA.Text.ToDecimal
|
||||||
|
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvFacturas.Rows
|
For Each Gvr As GridViewRow In GvFacturas.Rows
|
||||||
@@ -101,7 +104,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
|
|
||||||
TotalImportePrePoliza = TotalImporte
|
TotalImportePrePoliza = TotalImporte
|
||||||
If Comision <> 0 Then
|
If Comision <> 0 Then
|
||||||
TotalImporte = TotalImporte + Comision + Descuento
|
TotalImporte = TotalImporte + Comision + Descuento + IVA
|
||||||
'Comision = -(Comision) ' se inverte el valor, va cargada
|
'Comision = -(Comision) ' se inverte el valor, va cargada
|
||||||
'Descuento = -(Descuento) ' se inverte el valor, va cargada
|
'Descuento = -(Descuento) ' se inverte el valor, va cargada
|
||||||
If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then
|
If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then
|
||||||
@@ -166,6 +169,10 @@ Partial Class Bancos_DepositosCaja
|
|||||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, IVA, DdlClasificacion.SelectedItem.Text, 14, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ChkDescuento.Checked Then
|
If ChkDescuento.Checked Then
|
||||||
|
|||||||
@@ -136,10 +136,15 @@
|
|||||||
if (document.getElementById("hdnEsThickbox").value == "S") {
|
if (document.getElementById("hdnEsThickbox").value == "S") {
|
||||||
parent.CargaProveedor(c);
|
parent.CargaProveedor(c);
|
||||||
parent.tb_remove();
|
parent.tb_remove();
|
||||||
|
window.close();
|
||||||
|
parent.$('#ajax').modal('hide');
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
window.opener.CargaProveedor(c);
|
window.opener.CargaProveedor(c);
|
||||||
window.close();
|
window.close();
|
||||||
|
parent.$('#ajax').modal('hide');
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function IrOI(c) {
|
function IrOI(c) {
|
||||||
|
|||||||
@@ -1984,6 +1984,7 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
Response.Flush() ' send it to the client to download
|
Response.Flush() ' send it to the client to download
|
||||||
HttpContext.Current.Response.SuppressContent = True
|
HttpContext.Current.Response.SuppressContent = True
|
||||||
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||||
|
Response.End()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
result = True
|
result = True
|
||||||
|
|||||||
@@ -67,8 +67,7 @@
|
|||||||
<asp:Label ID="LblEncabezado" runat="server" Text=" Registro de Póliza"></asp:Label>
|
<asp:Label ID="LblEncabezado" runat="server" Text=" Registro de Póliza"></asp:Label>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
<asp:UpdatePanel runat="server">
|
|
||||||
<ContentTemplate>
|
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="far fa-file-excel" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="far fa-file-excel" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
@@ -79,11 +78,6 @@
|
|||||||
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="false" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
|
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="false" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
<Triggers>
|
|
||||||
<asp:PostBackTrigger ControlID="LnkComprobante" />
|
|
||||||
</Triggers>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|||||||
@@ -201,6 +201,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
|
Tick = DateTime.Now.Ticks.ToString
|
||||||
|
|
||||||
CveMoneda = 1
|
CveMoneda = 1
|
||||||
ViewState("CvePrePoliza") = 0
|
ViewState("CvePrePoliza") = 0
|
||||||
ViewState("CvePeriodo") = "0"
|
ViewState("CvePeriodo") = "0"
|
||||||
@@ -439,6 +441,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
If dr("IdPoliza").ToString.ToEntero > 0 Then
|
If dr("IdPoliza").ToString.ToEntero > 0 Then
|
||||||
HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza"))
|
HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza"))
|
||||||
divContabilizada.Visible = True
|
divContabilizada.Visible = True
|
||||||
|
IdPoliza = dr("IdPoliza").ToString.ToEntero
|
||||||
ElseIf TxtTotalCargos.Text.ToDouble = TxtTotalAbonos.Text.ToDouble Then
|
ElseIf TxtTotalCargos.Text.ToDouble = TxtTotalAbonos.Text.ToDouble Then
|
||||||
'sino está contabilizada, se activa el botón
|
'sino está contabilizada, se activa el botón
|
||||||
BtnContabilizar.Visible = True
|
BtnContabilizar.Visible = True
|
||||||
@@ -515,7 +518,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
If CveConceptoContable.Contiene(30) Then
|
If CveConceptoContable.Contiene(30) Then
|
||||||
LnkImprimirPDF.Visible = True
|
LnkImprimirPDF.Visible = True
|
||||||
LnkComprobante.Visible = True
|
|
||||||
CveIE = e.Row.DBCampo("CveIE").ToString.ToEntero
|
CveIE = e.Row.DBCampo("CveIE").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2131,6 +2133,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Response.Flush() ' send it to the client to download
|
Response.Flush() ' send it to the client to download
|
||||||
HttpContext.Current.Response.SuppressContent = True
|
HttpContext.Current.Response.SuppressContent = True
|
||||||
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||||
|
Response.End()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
result = True
|
result = True
|
||||||
|
|||||||
@@ -369,15 +369,19 @@ Partial Class Inventarios_Kardex
|
|||||||
Private Sub Imprimir(Optional reporte As String = "PDF")
|
Private Sub Imprimir(Optional reporte As String = "PDF")
|
||||||
|
|
||||||
Dim DtKardex As DataTable = Nothing
|
Dim DtKardex As DataTable = Nothing
|
||||||
DtKardex = CargarKardex(ddlProducto2.SelectedValue.ToEntero)
|
If ddlProducto2.SelectedValue.ToEntero > 0 Then
|
||||||
If (Not IsNothing(DtKardex)) Then
|
DtKardex = CargarKardex(ddlProducto2.SelectedValue.ToEntero)
|
||||||
Dim params As New List(Of ReportParameter)
|
If (Not IsNothing(DtKardex)) Then
|
||||||
If IO.File.Exists(String.Format("{0}/Formatos/Kardex.rdlc", UsuarioActual.Empresa.Ruta)) Then
|
Dim params As New List(Of ReportParameter)
|
||||||
ImprimirPDF(String.Format("Empresas/{0}/Formatos/Kardex.rdlc", UsuarioActual.CveEmpresa), DtKardex, params, "ReporteKardex", reporte)
|
If IO.File.Exists(String.Format("{0}/Formatos/Kardex.rdlc", UsuarioActual.Empresa.Ruta)) Then
|
||||||
Else
|
ImprimirPDF(String.Format("Empresas/{0}/Formatos/Kardex.rdlc", UsuarioActual.CveEmpresa), DtKardex, params, "ReporteKardex", reporte)
|
||||||
ImprimirPDF("Empresas/Grales/Formatos/Kardex.rdlc", DtKardex, params, "Reporte Kardex", reporte)
|
Else
|
||||||
|
ImprimirPDF("Empresas/Grales/Formatos/Kardex.rdlc", DtKardex, params, "Reporte Kardex", reporte)
|
||||||
|
End If
|
||||||
|
DtKardex.Dispose()
|
||||||
End If
|
End If
|
||||||
DtKardex.Dispose()
|
Else
|
||||||
|
Alert("No hay informacion cargada", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -385,61 +389,65 @@ Partial Class Inventarios_Kardex
|
|||||||
GenerarPDF()
|
GenerarPDF()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||||
Dim Movimientos As New ClsInventarios
|
If ddlProducto2.SelectedValue.ToEntero > 0 Then
|
||||||
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
Dim Movimientos As New ClsInventarios
|
||||||
Dim Entrada As Boolean = cbEntrada.Checked
|
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||||
Dim Salida As Boolean = cbSalida.Checked
|
Dim Entrada As Boolean = cbEntrada.Checked
|
||||||
|
Dim Salida As Boolean = cbSalida.Checked
|
||||||
|
|
||||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||||
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
|
||||||
Dim Almacen = If(ddlAlmacen.SelectedValue = "-1", "", $" <b>Almacén:</b> {ddlAlmacen.SelectedItem.Text}")
|
Dim Almacen = If(ddlAlmacen.SelectedValue = "-1", "", $" <b>Almacén:</b> {ddlAlmacen.SelectedItem.Text}")
|
||||||
Dim UM = If(DdlUnidadMedida.SelectedValue = "-1", "", $" <b>Unidad de Medida:</b> {DdlUnidadMedida.SelectedItem.Text}")
|
Dim UM = If(DdlUnidadMedida.SelectedValue = "-1", "", $" <b>Unidad de Medida:</b> {DdlUnidadMedida.SelectedItem.Text}")
|
||||||
Dim FechaIn As String = If(TxtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {TxtFechaI.Text}")
|
Dim FechaIn As String = If(TxtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {TxtFechaI.Text}")
|
||||||
Dim FechaFn As String = If(TxtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {TxtFechaF.Text}")
|
Dim FechaFn As String = If(TxtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {TxtFechaF.Text}")
|
||||||
Dim EntradaSalida As String = ""
|
Dim EntradaSalida As String = ""
|
||||||
|
|
||||||
If cbEntrada.Checked And cbSalida.Checked Then
|
If cbEntrada.Checked And cbSalida.Checked Then
|
||||||
EntradaSalida = " Entradas y Salidas"
|
EntradaSalida = " Entradas y Salidas"
|
||||||
ElseIf cbEntrada.Checked And cbSalida.Checked = False Then
|
ElseIf cbEntrada.Checked And cbSalida.Checked = False Then
|
||||||
EntradaSalida = " Solo Entradas"
|
EntradaSalida = " Solo Entradas"
|
||||||
ElseIf cbEntrada.Checked = False And cbSalida.Checked Then
|
ElseIf cbEntrada.Checked = False And cbSalida.Checked Then
|
||||||
EntradaSalida = " Solo Salidas"
|
EntradaSalida = " Solo Salidas"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveTiposAlmacen = ""
|
Dim CveTiposAlmacen = ""
|
||||||
For Each item As ListItem In CBLTiposAlmacen.Items
|
For Each item As ListItem In CBLTiposAlmacen.Items
|
||||||
CveTiposAlmacen += If(item.Selected, $"{item.Value},", "")
|
CveTiposAlmacen += If(item.Selected, $"{item.Value},", "")
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim Serie As String = If(TxtSerie.Text <> "", TxtSerie.Text, "-1")
|
Dim Serie As String = If(TxtSerie.Text <> "", TxtSerie.Text, "-1")
|
||||||
|
|
||||||
Dim SerieAgrupado As String = If(TxtSerie.Text = "", "", $"<b>Existencia y costos calculada por numero de serie:</b> {TxtSerie.Text} ")
|
Dim SerieAgrupado As String = If(TxtSerie.Text = "", "", $"<b>Existencia y costos calculada por numero de serie:</b> {TxtSerie.Text} ")
|
||||||
|
|
||||||
If Movimientos.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie) Then
|
If Movimientos.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie) Then
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
Dim dt As DataTable = Movimientos.DtResultados
|
Dim dt As DataTable = Movimientos.DtResultados
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||||
params.Add(New ReportParameter("Producto", ddlProducto2.SelectedText))
|
params.Add(New ReportParameter("Producto", ddlProducto2.SelectedText))
|
||||||
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {SerieAgrupado}{EntradaSalida}{Almacen}{UM}{FechaIn}{FechaFn}"))
|
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {SerieAgrupado}{EntradaSalida}{Almacen}{UM}{FechaIn}{FechaFn}"))
|
||||||
|
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
params.Add(New ReportParameter("LogoPath", logouri))
|
||||||
|
Else
|
||||||
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
|
End If
|
||||||
|
ImprimirPDF("Empresas/Grales/Formatos/RepKardex.rdlc", dt, params, "ReporteKardex", Formato)
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("LogoPath", ""))
|
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
ImprimirPDF("Empresas/Grales/Formatos/RepKardex.rdlc", dt, params, "ReporteKardex", Formato)
|
|
||||||
Else
|
Else
|
||||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
Alert("Debes seleccionar un Producto/Servicio", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -450,7 +458,7 @@ Partial Class Inventarios_Kardex
|
|||||||
Protected Sub LnkEditarFecha_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkEditarFecha_Click(sender As Object, e As EventArgs)
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||||
CveMovimiento = gvRow.DataKey("CveMovimiento").ToEntero
|
CveMovimiento = gvRow.DataKey("CveMovimiento").ToEntero
|
||||||
TxtFecha.Text = gvRow.DataKey("FechaMovto").ToDateTime.ToString("yyyy-MM-ddTHH:mm")
|
TxtFecha.Text = gvRow.DataKey("FechaMovto").ToDateTime.ToString("yyyy-MM-ddTHH: mm")
|
||||||
RegistraScript("$('#DModalEditarFecha').modal()")
|
RegistraScript("$('#DModalEditarFecha').modal()")
|
||||||
UpModalEditarFecha.Update()
|
UpModalEditarFecha.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -348,25 +348,6 @@ Partial Class Sistemas_PopUpAddUsuario
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
For Each Row As GridViewRow In GvModulosApp.Rows
|
|
||||||
If Row.DataKey("CveProcesoAcceso") <> "" Then
|
|
||||||
'checo si el permiso que tiene es del rol, de ser así, nada más actualizo los denegados
|
|
||||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkDenegar").Checked OrElse Row.DataKey("Permitir") = "0" AndAlso Row.FCCheckBox("ChkDenegar").Checked = False Then
|
|
||||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Not Row.FCCheckBox("ChkDenegar").Checked, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
|
||||||
HuboError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
'permisos que el rol, no le está otorgando, y serán únicos para el usuario
|
|
||||||
If Row.DataKey("Permitir") = "" AndAlso Row.FCCheckBox("ChkPermitir").Checked OrElse Row.DataKey("Permitir") = "1" AndAlso Row.FCCheckBox("ChkPermitir").Checked = False Then
|
|
||||||
If Not ObjUsuarios.UpdateUsuariosProcesos(CveUsuario, Row.DataKey("CveProceso").ToEntero, Row.FCCheckBox("ChkPermitir").Checked, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
|
||||||
HuboError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ElseIf CveUsuario > 0 Then
|
ElseIf CveUsuario > 0 Then
|
||||||
|
|||||||
@@ -994,7 +994,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Private Sub CargaResponsables()
|
Private Sub CargaResponsables()
|
||||||
Dim Dt As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("True", "Nombre")
|
Dim Dt As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("True", "Nombre")
|
||||||
DdlResponsable.DataSource = Dt.FiltraParametros("", "", {"CveUsuario", "Nombre"})
|
DdlResponsable.DataSource = Dt.FiltraParametros("Estatus = 1", "", {"CveUsuario", "Nombre"})
|
||||||
DdlResponsable.DataBind()
|
DdlResponsable.DataBind()
|
||||||
DdlResponsable.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlResponsable.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
|
|||||||
@@ -231,6 +231,10 @@
|
|||||||
<asp:LinkButton ID="LBNotaCredito" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar Nota de Crédito"
|
<asp:LinkButton ID="LBNotaCredito" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar Nota de Crédito"
|
||||||
data-toggle="modal" data-target="#ModalAplicarNC" Visible="false" />
|
data-toggle="modal" data-target="#ModalAplicarNC" Visible="false" />
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkAplicarRNCDevolucion" runat="server" Visible="false" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar RNC por devolución"
|
||||||
|
OnClick="LnkAplicarRNCDevolucion_Click" />
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LBAplicaDevolucion" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar Devolución"
|
<asp:LinkButton ID="LBAplicaDevolucion" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Aplicar Devolución"
|
||||||
data-toggle="modal" data-target="#DivAplicaDevolucion" Visible="false" />
|
data-toggle="modal" data-target="#DivAplicaDevolucion" Visible="false" />
|
||||||
@@ -6749,6 +6753,83 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<%--APLICAR REMISIONES DE NC DE DEVOLUCION--%>
|
||||||
|
<div id="ModalAplicaRNCDevolucion" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel ID="UpRNCDevolucion" class="modal-dialog rowpadding modal-lg" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Aplicar Remisiones de Nota de Crédito</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="portlet light xspadding bordered">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Devoluciones</span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
|
||||||
|
<div class="row" style="margin-right: 10px;" align="right">
|
||||||
|
<input type="text" id="TxtBusquedaRNCDev" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaRNCDev','{0}')", GvRNCDevoluciones.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaRNCDev','{0}')", GvRNCDevoluciones.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12" style="max-height: 440px; overflow: auto">
|
||||||
|
<asp:GridView ID="GvRNCDevoluciones" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="CveVenta" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBox ID="ChkAplicar" runat="server" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
|
||||||
|
<asp:Literal ID="LtlAbrev" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtImporte" CssClass="myvalue ImportesRNCCargo" runat="server" Width="75px" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||||
|
<asp:Button Text="Aplicar Remisiones" ID="BtnAplicarRNCDevoluciones" OnClick="BtnAplicarRNCDevoluciones_Click" CssClass="btn btn-primary" runat="server" ValidationGroup="VGAplicarRNC" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="ModalSaldarVenta" class="modal ADS fade" role="dialog">
|
<div id="ModalSaldarVenta" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel ID="UpSaldarVenta" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpSaldarVenta" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -8932,23 +9013,23 @@
|
|||||||
function showDivAgregarSucursal() {
|
function showDivAgregarSucursal() {
|
||||||
|
|
||||||
$('#<%= TxtNombreSucursal.ClientID %>').val('');
|
$('#<%= TxtNombreSucursal.ClientID %>').val('');
|
||||||
$('#<%= TxtDireccionSucursal.ClientID %>').val('');
|
$('#<%= TxtDireccionSucursal.ClientID %>').val('');
|
||||||
$('#<%= TxtNumExtSucursal.ClientID %>').val('');
|
$('#<%= TxtNumExtSucursal.ClientID %>').val('');
|
||||||
$('#<%= TxtNumIntSucursal.ClientID %>').val('');
|
$('#<%= TxtNumIntSucursal.ClientID %>').val('');
|
||||||
$('#<%= TxtCPSucursal.ClientID %>').val('');
|
$('#<%= TxtCPSucursal.ClientID %>').val('');
|
||||||
$('#<%= TxtColoniaSucursal.ClientID %>').val('');
|
$('#<%= TxtColoniaSucursal.ClientID %>').val('');
|
||||||
$('#<%= TxtTelefonoSucursal.ClientID %>').val('');
|
$('#<%= TxtTelefonoSucursal.ClientID %>').val('');
|
||||||
$('#<%= TxtCiudadSucursal.ClientID %>').val('');
|
$('#<%= TxtCiudadSucursal.ClientID %>').val('');
|
||||||
$('#<%= TxtLocalidadSucursal.ClientID %>').val('');
|
$('#<%= TxtLocalidadSucursal.ClientID %>').val('');
|
||||||
$('#<%= TxtEstadoSucursal.ClientID %>').val('');
|
$('#<%= TxtEstadoSucursal.ClientID %>').val('');
|
||||||
$('#<%= TxtPaisSucursal.ClientID %>').val('');
|
$('#<%= TxtPaisSucursal.ClientID %>').val('');
|
||||||
$('#<%= TxtCorreoSucursal.ClientID %>').val('');
|
$('#<%= TxtCorreoSucursal.ClientID %>').val('');
|
||||||
$('#divAgregarSucursal').modal();
|
$('#divAgregarSucursal').modal();
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideDivAgregarSucursal() {
|
function hideDivAgregarSucursal() {
|
||||||
$('#divAgregarSucursal').modal('hide');
|
$('#divAgregarSucursal').modal('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -9403,6 +9403,15 @@ Partial Class Ventas
|
|||||||
ObjFactura.CveVentaPadre = DtVentasNC.Rows(0)("CveVenta").ToString().ToEntero()
|
ObjFactura.CveVentaPadre = DtVentasNC.Rows(0)("CveVenta").ToString().ToEntero()
|
||||||
ObjFactura.SerieFolioPadre = DtVentasNC.Rows(0)("FolioFiscal").ToString()
|
ObjFactura.SerieFolioPadre = DtVentasNC.Rows(0)("FolioFiscal").ToString()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Dev" AndAlso ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
|
||||||
|
Dim ObjRNC = ListaRemisionesNC.FirstOrDefault
|
||||||
|
If ObjRNC IsNot Nothing Then
|
||||||
|
ObjFactura.CveVentaPadre = ObjRNC.CveVentaPadre
|
||||||
|
ObjFactura.SerieFolioPadre = ObjRNC.SerieFolioPadre
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
ObjFactura.CveVendedor = DdlVendedor.SelectedValue.ToEntero()
|
ObjFactura.CveVendedor = DdlVendedor.SelectedValue.ToEntero()
|
||||||
If DdlVendedor.SelectedValue.ToEntero() > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
If DdlVendedor.SelectedValue.ToEntero() > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
||||||
DdlVendedor.Enabled = False
|
DdlVendedor.Enabled = False
|
||||||
@@ -24798,6 +24807,11 @@ Partial Class Ventas
|
|||||||
AplicaNCMasiva = False
|
AplicaNCMasiva = False
|
||||||
AplicaNC = False
|
AplicaNC = False
|
||||||
LBNotaCredito.Visible = True
|
LBNotaCredito.Visible = True
|
||||||
|
|
||||||
|
If UsuarioActual.CveUsuario = 100 Then
|
||||||
|
LnkAplicarRNCDevolucion.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
'LkNotaCredito.Visible = False
|
'LkNotaCredito.Visible = False
|
||||||
|
|
||||||
TxtNCPorcentaje.Attributes.Add("onkeyup", "CalculaImporteNC();")
|
TxtNCPorcentaje.Attributes.Add("onkeyup", "CalculaImporteNC();")
|
||||||
@@ -24848,6 +24862,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
AplicaNCMasiva = True
|
AplicaNCMasiva = True
|
||||||
LBNotaCredito.Visible = True
|
LBNotaCredito.Visible = True
|
||||||
|
If UsuarioActual.CveUsuario = 100 Then
|
||||||
|
LnkAplicarRNCDevolucion.Visible = True
|
||||||
|
End If
|
||||||
'LkNotaCredito.Visible = False
|
'LkNotaCredito.Visible = False
|
||||||
DivGvCxC.Visible = True
|
DivGvCxC.Visible = True
|
||||||
CargaCxC()
|
CargaCxC()
|
||||||
@@ -25391,6 +25408,12 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub GvRNCDevoluciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvRNCDevoluciones.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCBonChkDesc({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
|
||||||
|
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCBonChkDesc({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble});")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDescNCBonificaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDescNCBonificaciones.RowDataBound
|
Protected Sub GvDescNCBonificaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDescNCBonificaciones.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
@@ -25516,26 +25539,31 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional AplicaNuevoDocumento As Boolean = False, Optional AplicoNCFacturaActual As Boolean = False)
|
Private Sub AplicarNC(CvePS As Integer, Optional NCDescuento As Boolean = False, Optional EsNCAmortizacion As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional AplicaNuevoDocumento As Boolean = False, Optional AplicoNCFacturaActual As Boolean = False, Optional TipoDoctoNC As String = "Egs")
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Me.AplicaDocumentoNuevoNC = AplicaNuevoDocumento
|
Me.AplicaDocumentoNuevoNC = AplicaNuevoDocumento
|
||||||
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
Dim DrPS As DataRow = Nothing
|
||||||
If DrPS Is Nothing Then
|
|
||||||
Alert("Ocurrió un error al cargar la información del producto. Por favor comuniquese con asistencia SIG", TipoMensaje.MsgError)
|
If CvePS > 0 AndAlso TipoDoctoNC = "Egs" Then
|
||||||
Exit Sub
|
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||||
Else
|
If DrPS Is Nothing Then
|
||||||
'VALIDA CLAVES SAT
|
Alert("Ocurrió un error al cargar la información del producto. Por favor comuniquese con asistencia SIG", TipoMensaje.MsgError)
|
||||||
If DrPS("SATClavePS").ToString() = "" Then
|
|
||||||
Alert($"El concepto <b>{DrPS("Codigo").ToString()}-{DrPS("PS").ToString()}</b> no cuenta con producto SAT. Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
If DrPS("SATClaveUnidadMedida").ToString() = "" Then
|
|
||||||
Alert($"El concepto <b>{DrPS("Codigo").ToString()}-{DrPS("PS").ToString()}</b> no cuenta con Unidad Medida SAT. Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
Else
|
||||||
|
'VALIDA CLAVES SAT
|
||||||
|
If DrPS("SATClavePS").ToString() = "" Then
|
||||||
|
Alert($"El concepto <b>{DrPS("Codigo").ToString()}-{DrPS("PS").ToString()}</b> no cuenta con producto SAT. Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If DrPS("SATClaveUnidadMedida").ToString() = "" Then
|
||||||
|
Alert($"El concepto <b>{DrPS("Codigo").ToString()}-{DrPS("PS").ToString()}</b> no cuenta con Unidad Medida SAT. Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not AplicaImpuestosLocales Then
|
If Not AplicaImpuestosLocales Then
|
||||||
If TmpDTImpuestos IsNot Nothing Then
|
If TmpDTImpuestos IsNot Nothing Then
|
||||||
TmpDTImpuestos.Rows.Clear()
|
TmpDTImpuestos.Rows.Clear()
|
||||||
@@ -25737,7 +25765,7 @@ Partial Class Ventas
|
|||||||
Else
|
Else
|
||||||
If DdlTipoComprobante.SelectedValue = "Ant" Then CveAnticipo = CveVenta
|
If DdlTipoComprobante.SelectedValue = "Ant" Then CveAnticipo = CveVenta
|
||||||
|
|
||||||
DdlTipoComprobante.SelectedValueExist("Egs")
|
DdlTipoComprobante.SelectedValueExist(TipoDoctoNC)
|
||||||
'verifica el total de multiples facturas
|
'verifica el total de multiples facturas
|
||||||
Dim Acumulado12 As Decimal = 0
|
Dim Acumulado12 As Decimal = 0
|
||||||
Dim UltimoRenglon As Integer = 1
|
Dim UltimoRenglon As Integer = 1
|
||||||
@@ -25768,7 +25796,10 @@ Partial Class Ventas
|
|||||||
CrearDTNCBonificacion(ListaRemisionesNC, DtImpuestosBonificacion, TmpDT, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
CrearDTNCBonificacion(ListaRemisionesNC, DtImpuestosBonificacion, TmpDT, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ElseIf TipoDoctoNC = "Dev" Then
|
||||||
|
CrearDTNCDevolucion(ListaRemisionesNC, TmpDT, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
||||||
Else
|
Else
|
||||||
|
|
||||||
For Each Dr As DataRow In DtImpuestos.Rows
|
For Each Dr As DataRow In DtImpuestos.Rows
|
||||||
Acumulado12 += Dr("ImportePU").ToString().ToDecimal.RoundSQL + Dr("ImporteIVA").ToString().ToDecimal.RoundSQL + Dr("ImporteIEPS").ToString().ToDecimal
|
Acumulado12 += Dr("ImportePU").ToString().ToDecimal.RoundSQL + Dr("ImporteIVA").ToString().ToDecimal.RoundSQL + Dr("ImporteIEPS").ToString().ToDecimal
|
||||||
If UltimoRenglon = DtImpuestos.Rows.Count Then
|
If UltimoRenglon = DtImpuestos.Rows.Count Then
|
||||||
@@ -25795,7 +25826,16 @@ Partial Class Ventas
|
|||||||
CalculaTotalesVenta(RecalculaImpuestosLocales:=AplicaImpuestosLocales)
|
CalculaTotalesVenta(RecalculaImpuestosLocales:=AplicaImpuestosLocales)
|
||||||
|
|
||||||
TrTipoRelacion.Visible = True
|
TrTipoRelacion.Visible = True
|
||||||
DdlTiposRelacion.SelectedValueExist("1")
|
If TipoDoctoNC = "Egs" Then
|
||||||
|
DdlTiposRelacion.SelectedValueExist("1")
|
||||||
|
ElseIf TipoDoctoNC = "Dev" Then
|
||||||
|
If DdlTipoComprobante.Items.FindByValue("Dev") Is Nothing Then
|
||||||
|
DdlTipoComprobante.Items.Insert(0, New ListItem("Devolucion", "Dev"))
|
||||||
|
End If
|
||||||
|
DdlTipoComprobante.SelectedValueExist("Dev")
|
||||||
|
DdlTiposRelacion.SelectedValueExist("3")
|
||||||
|
End If
|
||||||
|
|
||||||
DdlSubProyectoDatos.Enabled = False
|
DdlSubProyectoDatos.Enabled = False
|
||||||
|
|
||||||
'condicióon, en la que se verifica que el importe total de aplicación de la nota de crédito sea igual al del total de la nota de crédito, ej. saldo de la factura 1000.01 y la nota de crédito se generó po 1000.00
|
'condicióon, en la que se verifica que el importe total de aplicación de la nota de crédito sea igual al del total de la nota de crédito, ej. saldo de la factura 1000.01 y la nota de crédito se generó po 1000.00
|
||||||
@@ -25804,6 +25844,7 @@ Partial Class Ventas
|
|||||||
If TT > TxtTotal.Text.ToDecimal Then TT = TxtTotal.Text.ToDecimal
|
If TT > TxtTotal.Text.ToDecimal Then TT = TxtTotal.Text.ToDecimal
|
||||||
CargaNCDT(CveVenta, TT)
|
CargaNCDT(CveVenta, TT)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'verifica el tipo de cambio que se actualice
|
'verifica el tipo de cambio que se actualice
|
||||||
If DdlMoneda.SelectedValue <> "1" Then
|
If DdlMoneda.SelectedValue <> "1" Then
|
||||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
||||||
@@ -25812,6 +25853,7 @@ Partial Class Ventas
|
|||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
|
|
||||||
LBNotaCredito.Visible = False
|
LBNotaCredito.Visible = False
|
||||||
|
LnkAplicarRNCDevolucion.Visible = False
|
||||||
CambiaTipoDocto()
|
CambiaTipoDocto()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -26160,6 +26202,88 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CrearDTNCDevolucion(ListaNC As List(Of Modelos.Factura), ByRef TmpDTCargo As DataTable, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String)
|
||||||
|
For Each RNC In ListaNC
|
||||||
|
Dim UltimoRenglonRNC As Integer = 1
|
||||||
|
Dim TotalAcumuladoRNC As Decimal = 0
|
||||||
|
Dim Terminar As Boolean = False
|
||||||
|
|
||||||
|
For Each RowRNC As DataRow In RNC.DtDetalle.FiltraParametros("", Orderby:="PU").Rows
|
||||||
|
|
||||||
|
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=RowRNC("CvePS").ToString().ToEntero()).FiltroPrimero("")
|
||||||
|
|
||||||
|
Dim Cantidad As Decimal = RowRNC("Cantidad").ToString().ToDecimal()
|
||||||
|
|
||||||
|
Dim CvePSCargo As Integer = RowRNC("CvePS").ToString().ToEntero()
|
||||||
|
|
||||||
|
Dim ImportePU = RowRNC("PU").ToString().ToDecimal
|
||||||
|
|
||||||
|
Dim Obs As String = ""
|
||||||
|
|
||||||
|
Dim TotalCalculableImpuestos As Decimal = (Cantidad * ImportePU)
|
||||||
|
|
||||||
|
Dim ImporteIVA = (TotalCalculableImpuestos * RowRNC("PorcentajeIVA").ToString().ToDecimal).RoundSQL(2)
|
||||||
|
Dim ImporteIEPS = (TotalCalculableImpuestos * RowRNC("PorcentajeIEPS").ToString().ToDecimal).RoundSQL(2)
|
||||||
|
Dim ImporteRetIVA = (TotalCalculableImpuestos * RowRNC("PorcentajeRetIVA").ToString().ToDecimal).RoundSQL(2)
|
||||||
|
Dim ImporteRetISR = (TotalCalculableImpuestos * RowRNC("PorcentajeRetISR").ToString().ToDecimal).RoundSQL(2)
|
||||||
|
Dim ImporteTotal = TotalCalculableImpuestos
|
||||||
|
|
||||||
|
TotalAcumuladoRNC += (TotalCalculableImpuestos + ImporteIVA + ImporteIEPS - ImporteRetIVA - ImporteRetISR).RoundSQL
|
||||||
|
|
||||||
|
'SI EL IMPORTE ES MAYOR REALIZA EL AJUSTE
|
||||||
|
If TotalAcumuladoRNC > RNC.TotalRemNCAplicado Then
|
||||||
|
Terminar = True
|
||||||
|
'RESTA LO SUMANDO DEL ACUMULADO
|
||||||
|
TotalAcumuladoRNC -= (TotalCalculableImpuestos + ImporteIVA + ImporteIEPS - ImporteRetIVA - ImporteRetISR)
|
||||||
|
|
||||||
|
Dim Diferencia As Decimal = RNC.TotalRemNCAplicado - TotalAcumuladoRNC
|
||||||
|
|
||||||
|
Dim TotalPartida As Decimal = (TotalCalculableImpuestos + ImporteIVA + ImporteIEPS - ImporteRetIVA - ImporteRetISR)
|
||||||
|
|
||||||
|
Dim PorcentajePorAplicar As Decimal = (Diferencia / TotalPartida)
|
||||||
|
|
||||||
|
Cantidad = Cantidad * PorcentajePorAplicar
|
||||||
|
|
||||||
|
TotalCalculableImpuestos = (Cantidad * ImportePU)
|
||||||
|
ImporteIVA = (TotalCalculableImpuestos * RowRNC("PorcentajeIVA").ToString().ToDecimal).RoundSQL(2)
|
||||||
|
ImporteIEPS = (TotalCalculableImpuestos * RowRNC("PorcentajeIEPS").ToString().ToDecimal).RoundSQL(2)
|
||||||
|
ImporteRetIVA = (TotalCalculableImpuestos * RowRNC("PorcentajeRetIVA").ToString().ToDecimal).RoundSQL(2)
|
||||||
|
ImporteRetISR = (TotalCalculableImpuestos * RowRNC("PorcentajeRetISR").ToString().ToDecimal).RoundSQL(2)
|
||||||
|
|
||||||
|
ImporteTotal = TotalCalculableImpuestos
|
||||||
|
|
||||||
|
TotalAcumuladoRNC += (TotalCalculableImpuestos + ImporteIVA + ImporteIEPS - ImporteRetIVA - ImporteRetISR).RoundSQL
|
||||||
|
End If
|
||||||
|
|
||||||
|
'SI ES EL ULTIMO REGLON REALIZA UN AJUSTE
|
||||||
|
If UltimoRenglonRNC = RNC.DtDetalle.Rows.Count OrElse Terminar Then
|
||||||
|
Dim Ajuste As Decimal = 0
|
||||||
|
If Math.Abs(RNC.TotalRemNCAplicado - TotalAcumuladoRNC) > 0.00 Then
|
||||||
|
Ajuste = RNC.TotalRemNCAplicado - TotalAcumuladoRNC
|
||||||
|
|
||||||
|
If ImporteIVA > 0 Then
|
||||||
|
ImporteIVA += Ajuste
|
||||||
|
ElseIf ImporteIEPS > 0 Then
|
||||||
|
ImporteIEPS += Ajuste
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
UltimoRenglonRNC += 1
|
||||||
|
|
||||||
|
AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
|
||||||
|
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||||
|
Obs, Cantidad, ImportePU, RowRNC("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowRNC("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||||
|
RowRNC("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowRNC("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||||
|
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowRNC("CveVentaDetalle").ToString().ToEntero())
|
||||||
|
|
||||||
|
If Terminar Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
Private Function CargaDtImpuestosNC(CveVentaNC As Integer, Importe As Decimal, Optional NCDescuento As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional NivelTotal As Integer = 1, Optional AplicaNCUsado As Boolean = False) As DataTable
|
Private Function CargaDtImpuestosNC(CveVentaNC As Integer, Importe As Decimal, Optional NCDescuento As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional NivelTotal As Integer = 1, Optional AplicaNCUsado As Boolean = False) As DataTable
|
||||||
Dim Total As Decimal = 0, SubTotal As Decimal = 0, Saldo As Decimal = 0
|
Dim Total As Decimal = 0, SubTotal As Decimal = 0, Saldo As Decimal = 0
|
||||||
|
|
||||||
@@ -26367,6 +26491,7 @@ Partial Class Ventas
|
|||||||
HplDownPDF.Visible = False
|
HplDownPDF.Visible = False
|
||||||
HLSaldarVenta.Visible = False
|
HLSaldarVenta.Visible = False
|
||||||
LBNotaCredito.Visible = False
|
LBNotaCredito.Visible = False
|
||||||
|
LnkAplicarRNCDevolucion.Visible = False
|
||||||
LiComplementoPago.Visible = False
|
LiComplementoPago.Visible = False
|
||||||
HlCuentaTerminal.Visible = False
|
HlCuentaTerminal.Visible = False
|
||||||
LiLnkGuias.Visible = False
|
LiLnkGuias.Visible = False
|
||||||
@@ -26743,6 +26868,7 @@ Partial Class Ventas
|
|||||||
HplDownPDF.Visible = False
|
HplDownPDF.Visible = False
|
||||||
HLSaldarVenta.Visible = False
|
HLSaldarVenta.Visible = False
|
||||||
LBNotaCredito.Visible = False
|
LBNotaCredito.Visible = False
|
||||||
|
LnkAplicarRNCDevolucion.Visible = False
|
||||||
LiComplementoPago.Visible = False
|
LiComplementoPago.Visible = False
|
||||||
HlCuentaTerminal.Visible = False
|
HlCuentaTerminal.Visible = False
|
||||||
LiLnkGuias.Visible = False
|
LiLnkGuias.Visible = False
|
||||||
@@ -31150,4 +31276,68 @@ Partial Class Ventas
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Protected Sub LnkAplicarRNCDevolucion_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim DtNC As DataTable = Nothing
|
||||||
|
|
||||||
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
|
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda:=-1, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
|
||||||
|
DtNC = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'RNC' AND TipoRNC = 3 AND CveVenta > 0 and Saldo > 0", "Moneda,Fecha,Folio")
|
||||||
|
End If
|
||||||
|
ObjMovtos.Dispose()
|
||||||
|
|
||||||
|
GvRNCDevoluciones.DataSource = DtNC
|
||||||
|
GvRNCDevoluciones.DataBind()
|
||||||
|
|
||||||
|
UpRNCDevolucion.Update()
|
||||||
|
|
||||||
|
RegistraScript("$('#ModalAplicaRNCDevolucion').modal('show');")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnAplicarRNCDevoluciones_Click(sender As Object, e As EventArgs)
|
||||||
|
Me.AplicaRNCXDetalle = False
|
||||||
|
|
||||||
|
If ListaRemisionesNC Is Nothing Then
|
||||||
|
ListaRemisionesNC = New List(Of Modelos.Factura)
|
||||||
|
Else
|
||||||
|
ListaRemisionesNC.Clear()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ListaNCBonificacion Is Nothing Then
|
||||||
|
ListaNCBonificacion = New List(Of Modelos.Factura)
|
||||||
|
Else
|
||||||
|
ListaNCBonificacion.Clear()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim TotalRemNCAplicado As Decimal = 0
|
||||||
|
|
||||||
|
For Each GvRow As GridViewRow In GvRNCDevoluciones.Rows
|
||||||
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
If GvRow.FCCheckBox("ChkAplicar").Checked Then
|
||||||
|
Dim RemNC As New Modelos.Factura(UsuarioActual, GvRow.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
|
||||||
|
RemNC.TotalRemNCAplicado = GvRow.FCTextBox("TxtImporte").Text.ToDecimal()
|
||||||
|
TotalRemNCAplicado += RemNC.TotalRemNCAplicado
|
||||||
|
|
||||||
|
If RemNC.TotalRemNCAplicado <= 0 Then
|
||||||
|
Alert($"Debe asignar un importe en la siguiente remisión: <b>{RemNC.SerieFolio}</b>", TipoMensaje.MsgAdvertencia)
|
||||||
|
ListaRemisionesNC.Clear()
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
ListaRemisionesNC.Add(RemNC)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
TxtImportesRemisionesNC.Text = TotalRemNCAplicado.FormatoNumero
|
||||||
|
TxtNCImporte.Text = TotalRemNCAplicado.FormatoNumero
|
||||||
|
|
||||||
|
UpModalRemisionesNC.Update()
|
||||||
|
UpAplicarNC.Update()
|
||||||
|
|
||||||
|
AplicarNC(-1, NCDescuento:=False, EsNCAmortizacion:=False, AplicaImpuestosLocales:=True, AplicaNuevoDocumento:=True, AplicoNCFacturaActual:=True, TipoDoctoNC:="Dev")
|
||||||
|
|
||||||
|
RegistraScript("$('#ModalAplicaRNCDevolucion').modal('hide');")
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Reference in New Issue
Block a user