-- mejoras, para considerar las devoluciones de caja
This commit is contained in:
@@ -225,7 +225,7 @@
|
||||
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante" CssClass="checkbox" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-2 DivComision" style="display: none">
|
||||
<div class="col-md-1 DivComision" style="display: none">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 100px">
|
||||
<asp:TextBox runat="server" ID="TxtComision"
|
||||
@@ -268,7 +268,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 DivDescuento" style="display: none">
|
||||
<div class="col-md-1 DivDescuento" style="display: none" id="divdescuento2" runat="server">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSubProyectoDescuento" Width="100px" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
@@ -277,7 +277,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2 DivDescuento" style="display: none">
|
||||
<div class="col-md-2 DivDescuento" style="display: none" id="divdescuento3" runat="server">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlClasificacionDescuento" Width="100%" AutoPostBack="false" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
@@ -289,7 +289,7 @@
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPersonal" AutoPostBack="false" Width="100%" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlPersonal.ClientID.ToString()%>">Emp:</label>
|
||||
<label for="<%= DdlPersonal.ClientID.ToString()%>">Empleado:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -340,14 +340,14 @@
|
||||
<label id="LblSubproyectoIntermediario">SubProyecto:</label></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>f
|
||||
</div>
|
||||
|
||||
<div class="row rowcheck truncate" id="DivRowCuenta" style="padding: 0px!important; margin: 0px!important" runat="server" visible="false">
|
||||
<div class="col-md-1" runat="server" id="Div3" style="width: 155px">
|
||||
<asp:CheckBox ID="ChkCuentaRetorno" runat="server" Text="Caja" CssClass="checkbox" />
|
||||
</div>
|
||||
<div class="col-md-2 DivRowCuenta2" id="DivCuentaImporte" style="display: none">
|
||||
<div class="col-md-1 DivRowCuenta2" id="DivCuentaImporte" style="display: none">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox runat="server" ID="TxtCuentaRetorno" Width="100px" onkeypress="return numericOnly(this);" ondrop="return false;" onpaste="return false;" CssClass=" form-control Numeros"></asp:TextBox>
|
||||
<label for="<%= TxtCuentaRetorno.ClientID.ToString()%>">Importe:</label>
|
||||
@@ -653,7 +653,7 @@
|
||||
var comision2 = ToDouble($('#C_TxtDescuento').val());
|
||||
if (comision2 > ValorTotalSeleccionado) {
|
||||
$('#C_TxtDescuento').val(descuento)
|
||||
alert("No es posible poner un IVA superior a lo seleccionado")
|
||||
alert("No es posible poner un valor superior a lo seleccionado")
|
||||
} else {
|
||||
saldo = ValorTotalSeleccionado - comision2 + comision - IVA - ComisionIntermediario - CuentaRetorno;
|
||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||
|
||||
@@ -50,7 +50,8 @@ Partial Class Bancos_DepositosCaja
|
||||
DdlTipoPago.Items.Remove(DdlTipoPago.Items.FindByValue("-1"))
|
||||
End If
|
||||
|
||||
DivDescuentocheck.Visible = False
|
||||
divdescuento2.Visible = False
|
||||
divdescuento3.Visible = False
|
||||
DivIntercheck.Visible = False
|
||||
End If
|
||||
|
||||
@@ -93,7 +94,12 @@ Partial Class Bancos_DepositosCaja
|
||||
DdlSubProyectoDescuento.DataBind()
|
||||
DdlSubProyectoDescuento.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2)
|
||||
Dim dtclasif As DataTable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2)
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
dtclasif = dtclasif.FiltraParametros("AplicaDepositoCaja = 1")
|
||||
End If
|
||||
|
||||
DdlClasificacion.DataSource = dtclasif
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
@@ -154,10 +160,12 @@ Partial Class Bancos_DepositosCaja
|
||||
ChkFaltante.Checked = False
|
||||
ChkDescuento.Checked = False
|
||||
ChkIntermediario.Checked = False
|
||||
ChkCuentaRetorno.Checked = False
|
||||
TxtComision.Text = ""
|
||||
TxtDescuento.Text = ""
|
||||
TxtIVA.Text = ""
|
||||
TxtComisionIntermediario.Text = ""
|
||||
TxtCuentaRetorno.Text = ""
|
||||
'lblValorTotal.Text = "0.0"
|
||||
lblValorTotalSeleccionado.Text = "0.0"
|
||||
divLabelTotal.Visible = True
|
||||
@@ -172,7 +180,6 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click
|
||||
|
||||
|
||||
If Not Validaciones() Then
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -185,7 +192,7 @@ Partial Class Bancos_DepositosCaja
|
||||
Dim IVA As Decimal = TxtIVA.Text.ToDecimal
|
||||
Dim ImporteInter As Decimal = TxtComisionIntermediario.Text.ToDecimal
|
||||
|
||||
Dim MsgError As String = "Ocurrió un error al realizar los depositos"
|
||||
Dim MsgError As String = ""
|
||||
|
||||
If DdlCuentaDeposito.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("No se ha especificado la cuenta a depositar.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -216,10 +223,10 @@ Partial Class Bancos_DepositosCaja
|
||||
If Descuento <> 0 Then
|
||||
TotalImporte = TotalImporte - Descuento
|
||||
'Descuento = -(Descuento) ' se inverte el valor, va cargada
|
||||
If DdlSubProyectoDescuento.SelectedValue.ToEntero = -1 Or DdlClasificacionDescuento.SelectedValue.ToEntero = -1 Then
|
||||
Alert("Debes Seleccionar un Subproyecto y una Clasificación de descuento", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
'If DdlSubProyectoDescuento.SelectedValue.ToEntero = -1 Or DdlClasificacionDescuento.SelectedValue.ToEntero = -1 Then
|
||||
' Alert("Debes Seleccionar un Subproyecto y una Clasificación de descuento", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
End If
|
||||
|
||||
If CuentaRetorno <> 0 Then
|
||||
@@ -365,17 +372,22 @@ Partial Class Bancos_DepositosCaja
|
||||
CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
||||
CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero
|
||||
If Comision <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, $"Depósito Bancario - FALTANTE/SOBRANTE - {tSubProyectoDeposito}", $"Depósito Bancario - {tSubProyectoDeposito}", CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then
|
||||
Dim tCveConcepto As Integer = 78
|
||||
Dim tTipoMovto As Boolean = True
|
||||
If Comision < 0 Then
|
||||
tCveConcepto = 51 : Comision = -Comision : tTipoMovto = False
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, tTipoMovto, Comision, Comision * TipoCambio, tCveConcepto, $"Depósito Bancario - FALTANTE/SOBRANTE - {tSubProyectoDeposito}", $"Depósito Bancario - {tSubProyectoDeposito}", CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not OcurrioError AndAlso ChkDescuento.Checked Then
|
||||
CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero
|
||||
CveSubProyectoDescuento = CveSubProyecto 'DdlSubProyectoDescuento.SelectedValue.ToEntero
|
||||
CveClasificacionDescuento = DdlClasificacionDescuento.SelectedValue.ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, Descuento * TipoCambio, 51, DdlClasificacionDescuento.SelectedItem.Text, DdlClasificacionDescuento.SelectedItem.Text & " " & DdlPersonal.SelectedItem.Text, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyectoDescuento, CvePersonal:=DdlPersonal.SelectedValue.ToEntero) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, Descuento * TipoCambio, 257, "", DdlPersonal.SelectedItem.Text, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyectoDescuento, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, CveIE:=CveIEOrigen) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
@@ -384,11 +396,7 @@ Partial Class Bancos_DepositosCaja
|
||||
End If
|
||||
|
||||
If Not OcurrioError AndAlso ChkCuentaRetorno.Checked Then
|
||||
CveTransaccionBanco = 13
|
||||
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco)
|
||||
Dim CveIEOrigenRetorno As Integer = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, $"Retorno Depósito Bancario - {tSubProyectoDeposito}", CuentaRetorno, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, CuentaRetorno, CuentaRetorno * TipoCambio, 30, $"Depósito Bancario - CAJA - {tSubProyectoDeposito}", TxtCuentaRetornoObs.Text.Trim, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigenRetorno) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, CuentaRetorno, CuentaRetorno * TipoCambio, 325, $"Depósito Bancario - CAJA - {tSubProyectoDeposito}", TxtCuentaRetornoObs.Text.Trim, CveSubProyecto:=CveSubProyecto) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
@@ -415,6 +423,7 @@ Partial Class Bancos_DepositosCaja
|
||||
Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero
|
||||
Dim CveCuentaBancaria As Integer = Gvr.DataKey("CveCuenta").ToEntero
|
||||
Dim tCveSubProyecto As Integer = Gvr.DataKey("CveSubProyecto").ToEntero
|
||||
If tCveSubProyecto <= 0 Then tCveSubProyecto = CveSubProyecto 'sino llega a tenerlo por caso de devolución, que tome el general
|
||||
|
||||
FolioIE = ObjBancos.GetNextFolio(CveCuentaBancaria, 2)
|
||||
If Not FolioIE > 0 Then
|
||||
|
||||
Reference in New Issue
Block a user