This commit is contained in:
@@ -136,7 +136,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="">
|
||||||
<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>
|
||||||
@@ -144,10 +144,7 @@
|
|||||||
<label>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">
|
<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: 110px; display: none" id="LblSubproyecto" >SubProyecto:</label>
|
||||||
|
|
||||||
@@ -155,7 +152,7 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4" style="display: none" id="divClasificacion">
|
<div class="col-md-5" style="display: none" id="divClasificacion">
|
||||||
|
|
||||||
<label class="col-md-1 truncate" style="width: 110px;" id="LblClasificacion">Clasificación:</label>
|
<label class="col-md-1 truncate" style="width: 110px;" id="LblClasificacion">Clasificación:</label>
|
||||||
|
|
||||||
@@ -167,11 +164,11 @@
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="">
|
||||||
<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-2" id="DivDescuento" style="display: none">
|
||||||
<label>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>
|
||||||
@@ -183,21 +180,47 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4" style="display: none" id="divClasificacionDescuento">
|
<div class="col-md-5" style="display: none" id="divClasificacionDescuento">
|
||||||
|
|
||||||
<label class="col-md-1 truncate" style="width: 110px;" id="LblClasificacionDescuento">Clasificación:</label>
|
<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 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>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="" >
|
||||||
|
|
||||||
|
<div class="col-md-1" runat="server" id="Div2">
|
||||||
|
<asp:CheckBox ID="ChkIntermediario" runat="server" Text="Intermediario"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-11" 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-2" 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 />
|
<br />
|
||||||
<div style="height:550px;overflow-x:scroll">
|
<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">
|
<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 +295,8 @@
|
|||||||
var comision = 0;
|
var comision = 0;
|
||||||
var descuento = 0;
|
var descuento = 0;
|
||||||
var saldo = 0;
|
var saldo = 0;
|
||||||
var IVA = 0
|
var IVA = 0;
|
||||||
|
var ComisionIntermediario = 0;
|
||||||
|
|
||||||
function FnSuma(chk, cantidad) {
|
function FnSuma(chk, cantidad) {
|
||||||
var saldoInicial = ToDouble($('#C_lblValorTotal').text());
|
var saldoInicial = ToDouble($('#C_lblValorTotal').text());
|
||||||
@@ -318,26 +342,7 @@
|
|||||||
//debugger;
|
//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')) {
|
if ($('#C_ChkDescuento').attr('checked')) {
|
||||||
var txtdescuento = ToDouble($('#C_TxtDescuento').val());
|
var txtdescuento = ToDouble($('#C_TxtDescuento').val());
|
||||||
@@ -363,6 +368,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 +429,7 @@
|
|||||||
$('#C_TxtComision').val(0)
|
$('#C_TxtComision').val(0)
|
||||||
alert("No es posible poner una comision superior a lo seleccionado")
|
alert("No es posible poner una comision superior a lo seleccionado")
|
||||||
} else {
|
} else {
|
||||||
saldo = ValorTotalSeleccionado + comision2 + descuento + IVA;
|
saldo = ValorTotalSeleccionado + comision2 + descuento - IVA - ComisionIntermediario;
|
||||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||||
comision = ToDouble($('#C_TxtComision').val())
|
comision = ToDouble($('#C_TxtComision').val())
|
||||||
}
|
}
|
||||||
@@ -393,7 +446,7 @@
|
|||||||
$('#C_TxtDescuento').val(descuento)
|
$('#C_TxtDescuento').val(descuento)
|
||||||
alert("No es posible poner un descuento superior a lo seleccionado")
|
alert("No es posible poner un descuento superior a lo seleccionado")
|
||||||
} else {
|
} else {
|
||||||
saldo = ValorTotalSeleccionado + comision2 + comision + IVA;
|
saldo = ValorTotalSeleccionado + comision2 + comision - IVA - ComisionIntermediario;
|
||||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||||
descuento = ToDouble($('#C_TxtDescuento').val())
|
descuento = ToDouble($('#C_TxtDescuento').val())
|
||||||
}
|
}
|
||||||
@@ -403,21 +456,30 @@
|
|||||||
|
|
||||||
function txtSumaIVA(txt) {
|
function txtSumaIVA(txt) {
|
||||||
var comision2 = ToDouble($('#C_TxtIVA').val());
|
var comision2 = ToDouble($('#C_TxtIVA').val());
|
||||||
var comisionNegativa = 0;
|
if (comision2 > ValorTotalSeleccionado) {
|
||||||
if (comision2 < 0) {
|
|
||||||
comisionNegativa = comision2 * -1;
|
|
||||||
}
|
|
||||||
if (comisionNegativa > ValorTotalSeleccionado) {
|
|
||||||
$('#C_TxtIVA').val(descuento)
|
$('#C_TxtIVA').val(descuento)
|
||||||
alert("No es posible poner un IVA superior a lo seleccionado")
|
alert("No es posible poner un IVA superior a lo seleccionado")
|
||||||
} else {
|
} else {
|
||||||
saldo = ValorTotalSeleccionado + descuento + comision + comision2;
|
saldo = ValorTotalSeleccionado + descuento + comision - comision2 - ComisionIntermediario;
|
||||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||||
IVA = ToDouble($('#C_TxtIVA').val())
|
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) {
|
function CheckFaltante(chk) {
|
||||||
if (chk.checked == true) {
|
if (chk.checked == true) {
|
||||||
$('#DivComision').css("display", "block");
|
$('#DivComision').css("display", "block");
|
||||||
@@ -425,7 +487,6 @@
|
|||||||
$('#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");
|
||||||
@@ -433,7 +494,6 @@
|
|||||||
$('#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");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -454,6 +514,14 @@
|
|||||||
$('#divClasificacionDescuento').css("display", "none");
|
$('#divClasificacionDescuento').css("display", "none");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function CheckIntermediario(chk) {
|
||||||
|
if (chk.checked == true) {
|
||||||
|
$('#DivInter').css("display", "block");
|
||||||
|
} else {
|
||||||
|
$('#DivInter').css("display", "none");
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,11 +24,14 @@ Partial Class Bancos_DepositosCaja
|
|||||||
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);")
|
TxtIVA.Attributes.Add("onKeyUp", "txtSumaIVA(event);")
|
||||||
|
TxtComisionIntermediario.Attributes.Add("onKeyUp", "txtSumaTntermediario(event);")
|
||||||
|
|
||||||
|
|
||||||
CargaCuentas()
|
CargaCuentas()
|
||||||
ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);")
|
ChkFaltante.Attributes.Add("onclick", "CheckFaltante(this);")
|
||||||
ChkDescuento.Attributes.Add("onclick", "CheckDescuento(this);")
|
ChkDescuento.Attributes.Add("onclick", "CheckDescuento(this);")
|
||||||
|
ChkIntermediario.Attributes.Add("onclick", "CheckIntermediario(this);")
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -46,19 +49,30 @@ Partial Class Bancos_DepositosCaja
|
|||||||
|
|
||||||
DdlSubProyectoDeposito.DataSource = DdlSubProyectos.DataSource
|
DdlSubProyectoDeposito.DataSource = DdlSubProyectos.DataSource
|
||||||
DdlSubProyectoDeposito.DataBind()
|
DdlSubProyectoDeposito.DataBind()
|
||||||
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlSubProyectoDeposito.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
DdlSubProyectoDescuento.DataSource = DdlSubProyectos.DataSource
|
DdlSubProyectoDescuento.DataSource = DdlSubProyectos.DataSource
|
||||||
DdlSubProyectoDescuento.DataBind()
|
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.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2)
|
||||||
DdlClasificacion.DataBind()
|
DdlClasificacion.DataBind()
|
||||||
DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
DdlClasificacionDescuento.DataSource = DdlClasificacion.DataSource
|
DdlClasificacionDescuento.DataSource = DdlClasificacion.DataSource
|
||||||
DdlClasificacionDescuento.DataBind()
|
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 = DdlSubProyectos.DataSource
|
||||||
|
DdlSubProyectoIntermediario.DataBind()
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -80,7 +94,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
UpGvFacturas.Update()
|
UpGvFacturas.Update()
|
||||||
GvFacturas.DataBind()
|
GvFacturas.DataBind()
|
||||||
lblValorTotal.Text = "0.00"
|
lblValorTotal.Text = "0.00"
|
||||||
TxtComision.text = ""
|
TxtComision.Text = ""
|
||||||
divLabelTotal.Visible = True
|
divLabelTotal.Visible = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -91,6 +105,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
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
|
Dim IVA As Decimal = TxtIVA.Text.ToDecimal
|
||||||
|
Dim ImporteInter As Decimal = TxtComisionIntermediario.Text.ToDecimal
|
||||||
|
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvFacturas.Rows
|
For Each Gvr As GridViewRow In GvFacturas.Rows
|
||||||
@@ -104,7 +119,8 @@ Partial Class Bancos_DepositosCaja
|
|||||||
|
|
||||||
TotalImportePrePoliza = TotalImporte
|
TotalImportePrePoliza = TotalImporte
|
||||||
If Comision <> 0 Then
|
If Comision <> 0 Then
|
||||||
TotalImporte = TotalImporte + Comision + Descuento + IVA
|
TotalImporte = TotalImporte + Comision
|
||||||
|
TotalImporte = TotalImporte - Descuento - IVA - ImporteInter
|
||||||
'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
|
||||||
@@ -134,8 +150,12 @@ Partial Class Bancos_DepositosCaja
|
|||||||
Dim CveSubProyectoDescuento As Integer = -1
|
Dim CveSubProyectoDescuento As Integer = -1
|
||||||
Dim CveClasificacion As Integer = -1
|
Dim CveClasificacion As Integer = -1
|
||||||
Dim CveClasificacionDescuento 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 imprimirFolios As String = ""
|
||||||
|
Dim CveSubProyectoIntermediario As Integer = -1
|
||||||
|
Dim CveClasificacionIntermediario As Integer = -1
|
||||||
|
Dim CveProveedorIntermediario As Integer = -1
|
||||||
|
|
||||||
If drOrigen IsNot Nothing Then
|
If drOrigen IsNot Nothing Then
|
||||||
CveMoneda = drOrigen("CveMoneda").ToString.ToEntero
|
CveMoneda = drOrigen("CveMoneda").ToString.ToEntero
|
||||||
IdCuentaBancariaOrigen = drOrigen("IdCtaContable").ToString.ToEntero
|
IdCuentaBancariaOrigen = drOrigen("IdCtaContable").ToString.ToEntero
|
||||||
@@ -150,45 +170,60 @@ Partial Class Bancos_DepositosCaja
|
|||||||
|
|
||||||
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)
|
||||||
|
|
||||||
|
|
||||||
|
If ChkIntermediario.Checked Then
|
||||||
|
|
||||||
|
CveSubProyectoIntermediario = DdlSubProyectoIntermediario.SelectedValue.ToEntero
|
||||||
|
CveClasificacionIntermediario = DdlClasificacionIntermediario.SelectedValue.ToEntero
|
||||||
|
CveProveedorIntermediario = DdlProveedorIntermediario.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
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
|
'Entrada a bancos
|
||||||
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 13)
|
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 13)
|
||||||
If Not FolioIE > 0 Then
|
If Not FolioIE > 0 Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
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)
|
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
|
If ChkFaltante.Checked Then
|
||||||
CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
||||||
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
|
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
|
||||||
If Comision <> 0 Then
|
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
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
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
|
End If
|
||||||
|
|
||||||
If ChkDescuento.Checked Then
|
If ChkDescuento.Checked Then
|
||||||
CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero
|
CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero
|
||||||
CveClasificacionDescuento = DdlClasificacionDescuento.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
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
@@ -210,17 +245,20 @@ Partial Class Bancos_DepositosCaja
|
|||||||
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2)
|
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2)
|
||||||
If Not FolioIE > 0 Then
|
If Not FolioIE > 0 Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
|
Exit For
|
||||||
End If
|
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)
|
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
|
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
|
OcurrioError = True
|
||||||
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Asignamos la cuenta Deposito
|
'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
|
OcurrioError = True
|
||||||
|
Exit For
|
||||||
End If
|
End If
|
||||||
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}")
|
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}")
|
||||||
|
|
||||||
@@ -243,7 +281,10 @@ Partial Class Bancos_DepositosCaja
|
|||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
TxtComision.Text = ""
|
||||||
|
TxtDescuento.Text = ""
|
||||||
|
TxtIVA.Text = ""
|
||||||
|
TxtComisionIntermediario.Text = ""
|
||||||
ObjContabilidad.Dispose()
|
ObjContabilidad.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user