Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -193,13 +193,53 @@ Partial Class Bancos_CuentasBancariasDetalle
|
||||
|
||||
DdlTipoCuenta.SelectedValue = ObjCuentasBancariasDetalle.CveTipoCuenta.ToString
|
||||
|
||||
DdlTipoCuenta_SelectedIndexChanged(DdlTipoCuenta, EventArgs.Empty)
|
||||
DdlTipoCuenta_SelectedIndexChanged(DdlTipoCuenta, EventArgs.Empty)
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaConta.ToString)
|
||||
DdlCuentaContableComplementaria.SelectedValueExist(ObjCuentasBancariasDetalle.CveCuentaContaComplementaria.ToString)
|
||||
Else
|
||||
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContable.ToString)
|
||||
|
||||
Dim ExisteEnIntems As Boolean = False
|
||||
|
||||
For Each li As ListItem In DDlCuentaContable.Items
|
||||
If li.Value.ToEntero = ObjCuentasBancariasDetalle.IdCtaContable Then
|
||||
ExisteEnIntems = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
If ExisteEnIntems Then
|
||||
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContable.ToString)
|
||||
Else
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
Dim objCont As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
|
||||
If objCont.GetCuentas(ObjCuentasBancariasDetalle.IdCtaContable, "-1", -1) Then
|
||||
If objCont.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
DDlCuentaContable.Items.Add(New ListItem(objCont.DtResultados.Rows(0)("CtaCodigo").ToString, objCont.DtResultados.Rows(0)("id").ToString))
|
||||
DDlCuentaContable.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContable.ToString)
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
objCont.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
DdlCuentaContableComplementaria.SelectedValueExist(ObjCuentasBancariasDetalle.IdCtaContableComplementaria.ToString)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 40px;">F.I.:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding-top: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
<label class="col-md-1 truncate" style="width: 40px;">F.F.:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding-top: 0px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
@@ -110,7 +110,7 @@
|
||||
</div>
|
||||
<div class="col-md-3" runat="server" style="text-align: left;">
|
||||
<div class="col-md-1" >
|
||||
<label style="width:70px;">Fecha:</label>
|
||||
<label style="width:70px; padding-top:5px;">Fecha:</label>
|
||||
</div>
|
||||
<div class="col-md-1" >
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-top: 0; width: 140px !important;">
|
||||
@@ -137,67 +137,89 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2" runat="server" id="DivFaltante">
|
||||
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante"/>
|
||||
<div class="col-md-1 truncate" runat="server" id="DivFaltante" style ="width: 145px;" >
|
||||
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante" />
|
||||
</div>
|
||||
<div class="col-md-2" id="DivComision" style="display: none">
|
||||
<label>Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</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>
|
||||
|
||||
<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>
|
||||
<div class="col-md-10" id="DivComision" style="display: none;">
|
||||
<div class="col-md-3" >
|
||||
<label>Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label>SubProyecto:</label>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" style="display: none" id="divClasificacion">
|
||||
|
||||
<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>
|
||||
<div class="col-md-4">
|
||||
<label>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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2" runat="server" id="Div1">
|
||||
<div class="row" >
|
||||
<div class="col-md-1" runat="server" id="Div1" style ="width: 145px">
|
||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento"/>
|
||||
</div>
|
||||
<div class="col-md-3" id="DivDescuento" style="display: none">
|
||||
<label>Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-10" id="DivDescuento" style="display: none">
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" 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>
|
||||
<div class="col-md-3" >
|
||||
<label>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>
|
||||
</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 class="col-md-5">
|
||||
<label>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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1" runat="server" id="Div2" style ="width: 145px">
|
||||
<asp:CheckBox ID="ChkIntermediario" runat="server" Text="Intermediario"/>
|
||||
</div>
|
||||
<div class="col-md-10" id="DivInter" style="display: none">
|
||||
<div class="col-md-2" id="dd">
|
||||
<asp:Dropdownlist ID="DdlProveedorIntermediario" CssClassDdl="select2me" Width="100px" CssStyle="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" runat="server"></asp:Dropdownlist>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" id="DivinterImporte" >
|
||||
<label>Importe:</label>
|
||||
<asp:TextBox runat="server" ID="TxtComisionIntermediario" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-2" id="DivIVA" >
|
||||
<label>IVA:</label>
|
||||
<asp:TextBox runat="server" ID="TxtIVA" Class=" input-sm " Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-3" id="dd2">
|
||||
<label id="LblClasificacion3">Gasto:</label>
|
||||
<asp:DropDownList ID="DdlClasificacionIntermediario" 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 class="col-md-3" id="divSubProyectoIntermediario">
|
||||
<label id="LblSubproyectoIntermediario">SubProyecto:</label>
|
||||
|
||||
<asp:DropDownList ID="DdlSubProyectoIntermediario" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div style="height:550px;overflow-x:scroll">
|
||||
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe, SerieFolio" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; " GridLines="None">
|
||||
@@ -272,7 +294,8 @@
|
||||
var comision = 0;
|
||||
var descuento = 0;
|
||||
var saldo = 0;
|
||||
var IVA = 0
|
||||
var IVA = 0;
|
||||
var ComisionIntermediario = 0;
|
||||
|
||||
function FnSuma(chk, cantidad) {
|
||||
var saldoInicial = ToDouble($('#C_lblValorTotal').text());
|
||||
@@ -318,26 +341,7 @@
|
||||
//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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if ($('#C_ChkDescuento').attr('checked')) {
|
||||
var txtdescuento = ToDouble($('#C_TxtDescuento').val());
|
||||
@@ -363,6 +367,54 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($('#C_ChkIntermediario').attr('checked')) {
|
||||
var txtimporte= ToDouble($('#C_TxtComisionIntermediario').val());
|
||||
if (txtimporte != 0) {
|
||||
var DescuentoNegativa = 0;
|
||||
if (txtimporte > 0) {
|
||||
DescuentoNegativa = txtimporte * -1;
|
||||
}
|
||||
if (DescuentoNegativa > saldo) {
|
||||
$('#C_TxtDescuento').val(0);
|
||||
comision = 0;
|
||||
descuento = 0;
|
||||
IVA = 0;
|
||||
txtimporte = 0;
|
||||
alert("No es posible poner un descuento superior a lo seleccionado");
|
||||
saldo = 0;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2));
|
||||
debugger;
|
||||
} else {
|
||||
//saldo = ValorTotalSeleccionado + txtdescuento + comision;
|
||||
//$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
//descuento = ToDouble($('#C_TxtDescuento').val())
|
||||
//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;
|
||||
IVA = 0;
|
||||
ComisionIntermediario = 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -376,7 +428,7 @@
|
||||
$('#C_TxtComision').val(0)
|
||||
alert("No es posible poner una comision superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado + comision2 + descuento + IVA;
|
||||
saldo = ValorTotalSeleccionado + comision2 + descuento - IVA - ComisionIntermediario;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
comision = ToDouble($('#C_TxtComision').val())
|
||||
}
|
||||
@@ -393,7 +445,7 @@
|
||||
$('#C_TxtDescuento').val(descuento)
|
||||
alert("No es posible poner un descuento superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado + comision2 + comision + IVA;
|
||||
saldo = ValorTotalSeleccionado + comision2 + comision - IVA - ComisionIntermediario;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
descuento = ToDouble($('#C_TxtDescuento').val())
|
||||
}
|
||||
@@ -403,55 +455,52 @@
|
||||
|
||||
function txtSumaIVA(txt) {
|
||||
var comision2 = ToDouble($('#C_TxtIVA').val());
|
||||
var comisionNegativa = 0;
|
||||
if (comision2 < 0) {
|
||||
comisionNegativa = comision2 * -1;
|
||||
}
|
||||
if (comisionNegativa > ValorTotalSeleccionado) {
|
||||
if (comision2 > ValorTotalSeleccionado) {
|
||||
$('#C_TxtIVA').val(descuento)
|
||||
alert("No es posible poner un IVA superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado + descuento + comision + comision2;
|
||||
saldo = ValorTotalSeleccionado + descuento + comision - comision2 - ComisionIntermediario;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
IVA = ToDouble($('#C_TxtIVA').val())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function txtSumaTntermediario(txt) {
|
||||
var comision2 = ToDouble($('#C_TxtComisionIntermediario').val());
|
||||
if (comision2 > ValorTotalSeleccionado) {
|
||||
$('#C_TxtComisionIntermediario').val(descuento)
|
||||
alert("No es posible poner un importe superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado + descuento + comision - comision2 - IVA;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
ComisionIntermediario = ToDouble($('#C_TxtComisionIntermediario').val())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function CheckFaltante(chk) {
|
||||
if (chk.checked == true) {
|
||||
$('#DivComision').css("display", "block");
|
||||
$('#LblSubproyecto').css("display", "block");
|
||||
$('#divSubProyecto').css("display", "block");
|
||||
$('#LblClasificacion').css("display", "block");
|
||||
$('#divClasificacion').css("display", "block");
|
||||
$('#DivIVA').css("display", "block");
|
||||
|
||||
} else {
|
||||
$('#DivComision').css("display", "none");
|
||||
$('#LblSubproyecto').css("display", "none");
|
||||
$('#divSubProyecto').css("display", "none");
|
||||
$('#LblClasificacion').css("display", "none");
|
||||
$('#divClasificacion').css("display", "none");
|
||||
$('#DivIVA').css("display", "none");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function CheckDescuento(chk) {
|
||||
if (chk.checked == true) {
|
||||
$('#DivDescuento').css("display", "block");
|
||||
$('#LblSubproyectoDescuento').css("display", "block");
|
||||
$('#divSubProyectoDescuento').css("display", "block");
|
||||
$('#LblClasificacionDescuento').css("display", "block");
|
||||
$('#divClasificacionDescuento').css("display", "block");
|
||||
} else {
|
||||
|
||||
$('#DivDescuento').css("display", "none");
|
||||
$('#LblSubproyectoDescuento').css("display", "none");
|
||||
$('#divSubProyectoDescuento').css("display", "none");
|
||||
$('#LblClasificacionDescuento').css("display", "none");
|
||||
$('#divClasificacionDescuento').css("display", "none");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function CheckIntermediario(chk) {
|
||||
if (chk.checked == true) {
|
||||
$('#DivInter').css("display", "block");
|
||||
} else {
|
||||
$('#DivInter').css("display", "none");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -24,11 +24,14 @@ Partial Class Bancos_DepositosCaja
|
||||
TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);")
|
||||
TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(event);")
|
||||
TxtIVA.Attributes.Add("onKeyUp", "txtSumaIVA(event);")
|
||||
TxtComisionIntermediario.Attributes.Add("onKeyUp", "txtSumaTntermediario(event);")
|
||||
|
||||
|
||||
CargaCuentas()
|
||||
ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);")
|
||||
ChkDescuento.Attributes.Add("onclick", "CheckDescuento(this);")
|
||||
ChkIntermediario.Attributes.Add("onclick", "CheckIntermediario(this);")
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -46,19 +49,30 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
DdlSubProyectoDeposito.DataSource = DdlSubProyectos.DataSource
|
||||
DdlSubProyectoDeposito.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSubProyectoDeposito.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlSubProyectoDescuento.DataSource = DdlSubProyectos.DataSource
|
||||
DdlSubProyectoDescuento.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSubProyectoDescuento.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2)
|
||||
DdlClasificacion.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlClasificacionDescuento.DataSource = DdlClasificacion.DataSource
|
||||
DdlClasificacionDescuento.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlClasificacionDescuento.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
'intermediario
|
||||
DdlProveedorIntermediario.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveProveedor in ({0})", 73343))
|
||||
DdlProveedorIntermediario.DataBind()
|
||||
|
||||
DdlClasificacionIntermediario.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2)
|
||||
DdlClasificacionIntermediario.DataBind()
|
||||
|
||||
DdlSubProyectoIntermediario.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectoIntermediario.DataBind()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -80,7 +94,7 @@ Partial Class Bancos_DepositosCaja
|
||||
UpGvFacturas.Update()
|
||||
GvFacturas.DataBind()
|
||||
lblValorTotal.Text = "0.00"
|
||||
TxtComision.text = ""
|
||||
TxtComision.Text = ""
|
||||
divLabelTotal.Visible = True
|
||||
End Sub
|
||||
|
||||
@@ -91,6 +105,7 @@ Partial Class Bancos_DepositosCaja
|
||||
Dim Comision As Decimal = TxtComision.Text.ToDecimal
|
||||
Dim Descuento As Decimal = TxtDescuento.Text.ToDecimal
|
||||
Dim IVA As Decimal = TxtIVA.Text.ToDecimal
|
||||
Dim ImporteInter As Decimal = TxtComisionIntermediario.Text.ToDecimal
|
||||
|
||||
|
||||
For Each Gvr As GridViewRow In GvFacturas.Rows
|
||||
@@ -104,7 +119,7 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
TotalImportePrePoliza = TotalImporte
|
||||
If Comision <> 0 Then
|
||||
TotalImporte = TotalImporte + Comision + Descuento + IVA
|
||||
TotalImporte = TotalImporte + Comision + Descuento
|
||||
'Comision = -(Comision) ' 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
|
||||
@@ -113,6 +128,10 @@ Partial Class Bancos_DepositosCaja
|
||||
End If
|
||||
End If
|
||||
|
||||
If TxtComisionIntermediario.Text.ToDecimal <> 0 Then
|
||||
TotalImporte = TotalImporte - TxtComisionIntermediario.Text.ToDecimal - IVA
|
||||
End If
|
||||
|
||||
Dim OcurrioError As Boolean = False
|
||||
Dim ObjContabilidad As New ClsContabilidad()
|
||||
Dim ObjBancos As New ClsBancos(ObjContabilidad.IniciaTransacSQL())
|
||||
@@ -134,8 +153,12 @@ Partial Class Bancos_DepositosCaja
|
||||
Dim CveSubProyectoDescuento As Integer = -1
|
||||
Dim CveClasificacion As Integer = -1
|
||||
Dim CveClasificacionDescuento As Integer = -1
|
||||
Dim documentos As String = "Los Depósitos se realizaron exitósamente<br/><br/>"
|
||||
Dim documentos As String = "Los Depósitos se realizaron exitosamente<br/><br/>"
|
||||
Dim imprimirFolios As String = ""
|
||||
Dim CveSubProyectoIntermediario As Integer = -1
|
||||
Dim CveClasificacionIntermediario As Integer = -1
|
||||
Dim CveProveedorIntermediario As Integer = -1
|
||||
|
||||
If drOrigen IsNot Nothing Then
|
||||
CveMoneda = drOrigen("CveMoneda").ToString.ToEntero
|
||||
IdCuentaBancariaOrigen = drOrigen("IdCtaContable").ToString.ToEntero
|
||||
@@ -148,47 +171,72 @@ Partial Class Bancos_DepositosCaja
|
||||
CveCuentaBancariaDestino = drDestino("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
|
||||
NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1)
|
||||
|
||||
|
||||
If ChkIntermediario.Checked Then
|
||||
|
||||
CveSubProyectoIntermediario = DdlSubProyectoIntermediario.SelectedValue.ToEntero
|
||||
CveClasificacionIntermediario = DdlClasificacionIntermediario.SelectedValue.ToEntero
|
||||
CveProveedorIntermediario = DdlProveedorIntermediario.SelectedValue.ToEntero
|
||||
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, DdlClasificacionIntermediario.SelectedItem.Text, 95, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=TotalImporte, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, DdlClasificacionIntermediario.SelectedItem.Text, 95, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=TotalImporte, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, DdlClasificacionIntermediario.SelectedItem.Text, 51, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=ImporteInter) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If IVA <> 0 Then
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, IVA, DdlClasificacionIntermediario.SelectedItem.Text, 14, DdlClasificacionIntermediario.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=IVA, PorcentajeImpuesto:=0.16D) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'Entrada a bancos
|
||||
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 13)
|
||||
If Not FolioIE > 0 Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 13, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 13, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario)
|
||||
|
||||
documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Depósito: {1}</a>     <br/> ", CveIEOrigen, FolioIE)
|
||||
|
||||
|
||||
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio) Then
|
||||
|
||||
If ChkFaltante.Checked Then
|
||||
CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
||||
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
|
||||
If Comision <> 0 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
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If IVA <> 0 Then
|
||||
IVA = CDec(0.16)
|
||||
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
|
||||
CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero
|
||||
CveClasificacionDescuento = DdlClasificacionDescuento.SelectedValue.ToEntero
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
@@ -210,17 +258,20 @@ Partial Class Bancos_DepositosCaja
|
||||
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2)
|
||||
If Not FolioIE > 0 Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'Asignamos la cuenta Deposito
|
||||
If Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEDestino, CveIE) Then
|
||||
If Not OcurrioError AndAlso Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEDestino, CveIE) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}")
|
||||
|
||||
@@ -243,7 +294,10 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
|
||||
End If
|
||||
|
||||
TxtComision.Text = ""
|
||||
TxtDescuento.Text = ""
|
||||
TxtIVA.Text = ""
|
||||
TxtComisionIntermediario.Text = ""
|
||||
ObjContabilidad.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1556,7 +1556,39 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DModalDesconciliar" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDesconciliar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlDesconciliar" Text="Desconciliar" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="text-align: left">Fecha Desconciliado:</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDesconciliado" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaDesconciliado" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MeeFechaDesconciliado" runat="server" TargetControlID="TxtFechaDesconciliado" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CeFechaDesconciliado" TargetControlID="TxtFechaDesconciliado" PopupButtonID="LnkFechaDesconciliado" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvFechaDesconciliado" runat="server" ControlToValidate="TxtFechaDesconciliado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Desconciliado''</b> es necesario, por favor ingréselo." ValidationGroup="VGMModalDesconciliado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceFechaDesconciliado" runat="server" HighlightCssClass="vco" TargetControlID="RfvFechaDesconciliado"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnDesconciliar" OnClick="BtnDesconciliar_Click" runat="server" Text="Desconciliar" CssClass="btn btn-primary" ValidationGroup="VGMModalDesconciliado" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -179,10 +179,19 @@ Partial Class Bancos_IE
|
||||
ViewState("FechaCompra") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveIECancelacion As Integer
|
||||
Get
|
||||
If ViewState("CveIECancelacion") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveIECancelacion").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveIECancelacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ImporteOriginalDevDin As Decimal
|
||||
Get
|
||||
@@ -1002,9 +1011,6 @@ Partial Class Bancos_IE
|
||||
Select Case ObjIE.CveEstatusIE
|
||||
Case 1
|
||||
If Not ObjIE.FueConciliado Then
|
||||
'If UsuarioActual.TienePermisoProceso(85) Then ImgCancelarMovimiento.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(85) Then LnkCancelar.Visible = True
|
||||
|
||||
'ELIMINAR IE SIN VALIDACIONES
|
||||
If UsuarioActual.TienePermisoProceso(80) AndAlso NumComplementos = 0 Then LnkEliminar.Visible = True
|
||||
|
||||
@@ -1014,6 +1020,8 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(85) Then LnkCancelar.Visible = True
|
||||
|
||||
''COMENTAR - solo para pruebas
|
||||
'If UsuarioActual.TienePermisoProceso(85) Then LnkCancelar.Visible = True
|
||||
'If UsuarioActual.TienePermisoProceso(80) Then LnkEliminar.Visible = True
|
||||
@@ -1134,6 +1142,7 @@ Partial Class Bancos_IE
|
||||
LbMovimientoCancelado.Text = "Movimiento de Cancelación:"
|
||||
HLIECancelacion.NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", ObjIE.CveIECancelacion)
|
||||
HLIECancelacion.Text = ObjIE.FolioIECancelacion
|
||||
CveIECancelacion = ObjIE.CveIECancelacion
|
||||
End If
|
||||
|
||||
'MOVIMIENTO CANCELADO
|
||||
@@ -1212,7 +1221,7 @@ Partial Class Bancos_IE
|
||||
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
|
||||
'Dim ExistenComplementos As Boolean = VerificaComplementos(False)
|
||||
|
||||
If Not ChkConciliado.Checked And ObjIE.CveEstatusIE <> 2 Then
|
||||
If Not ChkConciliado.Checked And ObjIE.CveEstatusIE <> 2 And ObjIE.CveIECancelacion <= 0 Then
|
||||
|
||||
If (Not ExistenComplementosVigentes) Then
|
||||
|
||||
@@ -1233,7 +1242,7 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
LnkEliminar.Visible = False
|
||||
LnkCancelar.Visible = False
|
||||
'LnkCancelar.Visible = False
|
||||
|
||||
LnkCancelarComplemento.Visible = True
|
||||
LnkCancelarComplementoImporte.Visible = True
|
||||
@@ -1243,7 +1252,6 @@ Partial Class Bancos_IE
|
||||
|
||||
Else
|
||||
BtnEditar.Visible = False
|
||||
LnkEliminar.Visible = False
|
||||
LnkCancelarComplemento.Visible = False
|
||||
LnkCancelarComplementoImporte.Visible = False
|
||||
DVGenerarComplementoModal.Visible = False
|
||||
@@ -4753,7 +4761,11 @@ Partial Class Bancos_IE
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs) Handles LnkEliminar.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divDescripcion"))
|
||||
If CveIECancelacion > 0 Then
|
||||
Alert("El Movimiento no se puede eliminar porque tiene una cancelación relacionada, se tiene que eliminar primero la cancelación", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divDescripcion"))
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -5706,7 +5718,7 @@ Partial Class Bancos_IE
|
||||
|
||||
GvComplementoPagos.DataSource = ObjBancos.DtResultados
|
||||
|
||||
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then
|
||||
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 And ObjBancos.DtResultados.FiltraParametros(" CveIECancelacion > 0 ").Rows.Count = 0 Then
|
||||
DVGenerarComplementoModal.Visible = True
|
||||
End If
|
||||
Else
|
||||
@@ -5990,11 +6002,36 @@ Partial Class Bancos_IE
|
||||
|
||||
Protected Sub LnkCancelar_Click(sender As Object, e As EventArgs)
|
||||
If ChkConciliado.Checked Then
|
||||
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
TxtFechaDesconciliado.Text = Now.ToShortDateString
|
||||
UpDesconciliar.Update()
|
||||
RegistraScript("$('#DModalDesconciliar').modal()")
|
||||
End If
|
||||
RegistraScript("ShowDivCancelarIE();")
|
||||
End Sub
|
||||
Protected Sub BtnDesconciliar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjBancos As New ClsBancos
|
||||
Dim ObjOI As New ClsOIEventos(ObjBancos.IniciaTransacSQL())
|
||||
Dim ErrorTrans As Boolean = False
|
||||
|
||||
|
||||
If ObjBancos.DesconciliarIE(CveIE, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario) Then
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido desconciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
|
||||
ErrorTrans = True
|
||||
End If
|
||||
Else
|
||||
ErrorTrans = True
|
||||
End If
|
||||
|
||||
If Not ErrorTrans Then
|
||||
ObjBancos.Commit()
|
||||
Alert("Desconciliado correctamente")
|
||||
RegistraScript("$('#DModalDesconciliar').modal('hide')")
|
||||
Else
|
||||
ObjBancos.RollBack()
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
ObjOI.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub LnkEmitirComplemento_Click(sender As Object, e As EventArgs) Handles LnkEmitirComplemento.Click
|
||||
GeneraTimbre()
|
||||
|
||||
@@ -2659,6 +2659,9 @@ Partial Class Bancos_PopIECompras
|
||||
If MovimientoPagar.IVANoDeducible > 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), 280, ConceptoMovimiento, Fecha, IdCtaContableNoIVA, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMXNoDeducible, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Else
|
||||
ImporteMovimiento = 0
|
||||
ImporteMX = 0
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -2883,7 +2886,8 @@ Partial Class Bancos_PopIECompras
|
||||
|
||||
If MovimientoPagar.IVANoDeducible > 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), 280, ConceptoMovimiento, Fecha, IdCtaContableNoIVA, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMXNoDeducible, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
|
||||
End If
|
||||
End If
|
||||
'Case 280 'Iva Acreditable No Deducible
|
||||
|
||||
@@ -369,7 +369,7 @@
|
||||
<asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCxP" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes"
|
||||
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Original,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal"
|
||||
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Original,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal,EsImportacion"
|
||||
Width="100%" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
|
||||
@@ -974,7 +974,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Dim importeMX As Decimal
|
||||
Dim FechaMovimiento As Date = TxtFechaDocumento.Text.ToDate
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
Dim ConceptoMovimiento As String
|
||||
Dim Referencia As String
|
||||
Dim tipoCambioCompra As Decimal
|
||||
@@ -1003,6 +1002,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Dim DttPlantilla As DataTable = Nothing
|
||||
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
||||
DttPlantilla = ObjMov.DtResultados
|
||||
End If
|
||||
|
||||
Dim TipoContabilidad As Integer = UsuarioActual.Empresa.TipoContabilidad
|
||||
|
||||
'inserto las compras que voy a pagar
|
||||
For Each gvr As GridViewRow In GvCxP.Rows
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
@@ -1031,37 +1038,17 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
|
||||
|
||||
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
||||
For Each Row As DataRow In ObjMov.DtResultados.Rows
|
||||
'If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
|
||||
If DttPlantilla IsNot Nothing AndAlso DttPlantilla.Rows.Count > 0 Then
|
||||
For Each Row As DataRow In DttPlantilla.Rows
|
||||
ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
||||
TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False)
|
||||
ImporteMovimiento = 0
|
||||
IdCtaContable = 0
|
||||
CveCuenta = 0
|
||||
ConceptoMovimiento = $"{HplProveedor.Text} F:{gvr.DataKey("SerieFolio")}"
|
||||
Referencia = gvr.DataKey("SerieFolio").ToString
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
|
||||
If ConceptoContable.Contiene(14, 19) AndAlso gvr.DataKey("CveCompra").ToEntero > 0 Then
|
||||
Dim objcompras As New ClsCompras
|
||||
objcompras.GetCompras(gvr.DataKey("CveCompra").ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa)
|
||||
If objcompras.DtResultados IsNot Nothing AndAlso objcompras.DtResultados.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = objcompras.DtResultados.Rows(0)
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
If dr("EsImportacion").ToString = "True" Then
|
||||
EsImportacion = True
|
||||
If ConceptoContable = 14 Then
|
||||
ConceptoContable = 287
|
||||
Else
|
||||
ConceptoContable = 288
|
||||
End If
|
||||
Else
|
||||
EsImportacion = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Select Case ConceptoContable
|
||||
Case 17 'Pago Proveedores
|
||||
@@ -1100,7 +1087,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
IdCtaContable = CtaAcreedor
|
||||
Else
|
||||
IdCtaContable = CtaProveedor
|
||||
CveCuenta = CveCuentaProveedor
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -1109,7 +1095,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
IdCtaContable = IdCtaContComplementaria
|
||||
CveCuenta = CveCuentaProveedorExtranjera
|
||||
If ImporteMovimiento <> 0 AndAlso (UsaComplementariaProveedores Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos
|
||||
importeMX = ImporteMovimiento
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0.00D, Referencia, CveConceptoComplementaria, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioCompraValuacion - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompraValuacion, CveCuenta:=CveCuentaComplementaria) Then
|
||||
@@ -1117,7 +1102,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
End If
|
||||
IdCtaContable = IdCtaProveedorExtranjera
|
||||
CveCuenta = CveCuentaProveedorExtranjera
|
||||
End If
|
||||
Case 15 'Ret IVA X Acreditar Honorarios/Serv. Prof.
|
||||
If gvr.DataKey("CveRetIVAConcepto").ToEntero = 1 Then
|
||||
@@ -1149,23 +1133,13 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(307).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(307).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetIVA <> 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Case 22 'Ret IVA Acreditable Honorarios/Serv. Prof.
|
||||
If gvr.DataKey("CveRetIVAConcepto").ToEntero = 1 Then
|
||||
@@ -1196,7 +1170,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(308).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(308).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1232,23 +1206,13 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(309).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(309).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetIVA <> 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Case 184 'Ret IVA Acreditable Fletes P.F.
|
||||
If gvr.DataKey("CveRetIVAConcepto").ToEntero = 2 Then
|
||||
@@ -1279,7 +1243,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(310).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(310).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1315,23 +1279,13 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(311).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(311).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuentaRetIVA <> 0 Then
|
||||
CveCuenta = CveCuentaRetIVA
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Case 186 'Ret IVA Acreditable Fletes P.M.
|
||||
If gvr.DataKey("CveRetIVAConcepto").ToEntero = 3 Then
|
||||
@@ -1362,7 +1316,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(312).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(312).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1398,7 +1352,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(313).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(313).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1434,7 +1388,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(314).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(314).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1469,7 +1423,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(578).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1504,7 +1458,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(582).ToEntero > 0 Then
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(582).ToEntero
|
||||
Else
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
@@ -1545,16 +1499,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'Conta SIG
|
||||
' If CveCuentaRetISR <> 0 Then
|
||||
' CveCuenta = CveCuentaRetISR
|
||||
' Else
|
||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'Case 23 'Ret ISR Acreditable
|
||||
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 1 Then
|
||||
@@ -1590,16 +1535,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'Conta SIG
|
||||
' If CveCuentaRetISR <> 0 Then
|
||||
' CveCuenta = CveCuentaRetISR
|
||||
' Else
|
||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'Case 243 'Ret ISR x Acreditar Terceros y Arrendamiento
|
||||
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then
|
||||
@@ -1635,16 +1571,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'Conta SIG
|
||||
' If CveCuentaRetISR <> 0 Then
|
||||
' CveCuenta = CveCuentaRetISR
|
||||
' Else
|
||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'Case 244 'Ret ISR Acreditable Terceros y Arrendamiento
|
||||
' If gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then
|
||||
@@ -1680,15 +1607,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' 'Conta SIG
|
||||
' If CveCuentaRetISR <> 0 Then
|
||||
' CveCuenta = CveCuentaRetISR
|
||||
' Else
|
||||
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
Case 14 'Iva X Acreditar
|
||||
@@ -1746,83 +1664,21 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Dim IdCtaIVAXAcreditar As Integer = 0
|
||||
Dim IdCtaIVAAcreditable As Integer = 0
|
||||
|
||||
If gvr.DataKey("EsImportacion").ToString.contiene("1", "True") Then
|
||||
ConceptoContable = 287
|
||||
End If
|
||||
|
||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||
End If
|
||||
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Case 287 'Iva X Acreditar Importacion
|
||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||
|
||||
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVA").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2)
|
||||
|
||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
Else
|
||||
ImporteMovimiento = 0
|
||||
importeMX = 0
|
||||
End If
|
||||
Else
|
||||
ImporteMovimiento = gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago
|
||||
|
||||
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
End If
|
||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||
Dim IdCtaIVAXAcreditar As Integer = 0
|
||||
Dim IdCtaIVAAcreditable As Integer = 0
|
||||
|
||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||
End If
|
||||
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Case 19 'Iva Acreditado
|
||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||
@@ -1852,7 +1708,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
importeMX = 0
|
||||
End If
|
||||
Else
|
||||
ImporteMovimiento = gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago
|
||||
ImporteMovimiento = gvr.DataKey("IVAPorPagarDeducible").ToDecimal * PorcentajePago
|
||||
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMX = ImporteMovimiento
|
||||
@@ -1873,7 +1729,9 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
|
||||
If gvr.DataKey("EsImportacion").ToString.contiene("1", "True") Then
|
||||
ConceptoContable = 288
|
||||
End If
|
||||
|
||||
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||
Dim IdCtaIVAXAcreditar As Integer = 0
|
||||
@@ -1892,100 +1750,20 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal * PorcentajePago
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
Case 288 'Iva Acreditado
|
||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||
'funcionalidad que toma el 100% del pago para acreditamiento de iva
|
||||
If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = gvr.DataKey("IVADeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
Else
|
||||
ImporteMovimiento = 0
|
||||
importeMX = 0
|
||||
End If
|
||||
Else
|
||||
ImporteMovimiento = gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago
|
||||
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMX = ImporteMovimiento
|
||||
ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
End If
|
||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
|
||||
|
||||
PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||
Dim IdCtaIVAXAcreditar As Integer = 0
|
||||
Dim IdCtaIVAAcreditable As Integer = 0
|
||||
Dim IdCtaContableNoIVA As Integer = 0
|
||||
|
||||
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then
|
||||
IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
|
||||
IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
|
||||
IdCtaContableNoIVA = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVANoAcreditable").ToString.ToEntero
|
||||
End If
|
||||
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
|
||||
|
||||
'se registra el iva no acreditable
|
||||
If gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal > 0 Then
|
||||
|
||||
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal * PorcentajePago
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Case 25 'IEPS X Acreditar
|
||||
Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
ImporteMovimiento = gvr.DataKey("IEPSPorPagar").ToDecimal * PorcentajePago
|
||||
@@ -2005,10 +1783,9 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
TipoCambioGeneral = tipoCambioCompra
|
||||
|
||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Case 26 'IEPS Acreditable
|
||||
@@ -2029,17 +1806,15 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Case 64 'Ganancia
|
||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||
'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
@@ -2078,7 +1853,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
'Dim IEPS As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||
|
||||
'IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
'CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||
'Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion)
|
||||
'TipoCambioGeneral = TCImpuestos
|
||||
'''' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra
|
||||
@@ -2098,7 +1872,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
|
||||
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
@@ -2119,7 +1892,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
'Dim IEPS As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago)
|
||||
|
||||
'IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||
'CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
'Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion)
|
||||
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra
|
||||
'If TipoCambioPago > tipoCambioCompra AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
|
||||
@@ -2171,10 +1943,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ObjCreditos.GetTarjetasCreditos(DdlCuenta.SelectedValue.ToEntero, DdlTarjeta.SelectedValue.ToEntero)
|
||||
If ObjCreditos.DtResultados.Rows.Count > 0 AndAlso (ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjeta").ToString.ToEntero > 0 Or ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjetaSIG").ToString.ToEntero > 0) Then
|
||||
IdCtaContable = ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjeta").ToString.ToEntero
|
||||
CveCuenta = ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjetaSIG").ToString.ToEntero
|
||||
Else
|
||||
IdCtaContable = IdCuenta
|
||||
CveCuenta = CveCuentaB
|
||||
End If
|
||||
|
||||
ImporteMovimiento = TxtImporte.Text.ToDecimal
|
||||
@@ -2209,13 +1979,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
'Conta SIG
|
||||
If CveCuenta = 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", ConceptoContable)))
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveSubProyecto:=CveSubProyecto, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=importeMX, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveSubProyecto:=CveSubProyecto, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=importeMX, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
@@ -2656,10 +2420,12 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
'cuando es cheque
|
||||
If DdlTipoTransaccion.SelectedValue = "1" Then
|
||||
ChkAbonoCuenta.Visible = True
|
||||
|
||||
TxtPagueseA.Enabled = True
|
||||
|
||||
Else
|
||||
ChkAbonoCuenta.Visible = False
|
||||
TxtPagueseA.Enabled = False
|
||||
|
||||
End If
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
|
||||
@@ -3407,7 +3173,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, gr.DataKey("SerieFolio").ToString, 14, ConceptoPartida, Now, IdCtaContable:=IdCtaIVAXAcreditar, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IVA, IVA * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, gr.DataKey("SerieFolio").ToString, 14, ConceptoPartida, Now, IdCtaContable:=IdCtaIVAXAcreditar, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IVA, IVA * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
|
||||
@@ -3449,11 +3215,11 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
|
||||
If TCCompra > TCPago Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user