cambio en ventas, TC no editable
- popupaxiliar. generar póliza cancelada apartir de otra
This commit is contained in:
@@ -228,9 +228,9 @@ Public Class ClsContabilidad
|
||||
|
||||
|
||||
|
||||
Public Function AddPrePolizasNegativa(CvePrePoliza As Integer, CveUsuario As Integer, Concepto As String, CveEmpresa As Integer, Fecha As Date) As Boolean
|
||||
Public Function AddPrePolizasNegativa(CvePrePoliza As Integer, CveUsuario As Integer, Concepto As String, CveEmpresa As Integer, Fecha As Date) As Integer
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Conta_PrePolizasNegativaAdd")
|
||||
|
||||
@@ -240,11 +240,12 @@ Public Class ClsContabilidad
|
||||
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||
.Add("@CvePrePolizaNueva", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePolizaNueva").Value.ToString.ToEntero
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
@@ -390,23 +390,37 @@ Partial Class PopUpAuxiliar
|
||||
Dim TieneError As Boolean = False
|
||||
ObjContabilidad.IniciaTransacSQL()
|
||||
|
||||
If ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate) Then
|
||||
Alert("Se agrego polzia negativa correctamente.")
|
||||
Else
|
||||
Dim CvePrePolizaNueva As Integer = ObjContabilidad.AddPrePolizasNegativa(CvePrePoliza, UsuarioActual.CveUsuario, TxtConceptoCancelacion.Text, UsuarioActual.CveEmpresa, TxtFechaCancelacion.Text.ToDate)
|
||||
|
||||
If Not CvePrePolizaNueva > 0 Then
|
||||
|
||||
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
ObjContabilidad.RollBack()
|
||||
Else
|
||||
If Not TieneError Then
|
||||
|
||||
ObjContabilidad.Commit()
|
||||
Dim Str As New StringBuilder
|
||||
Str.Append("Se agrego la póliza de cancelación correctamente.<br/>")
|
||||
RegistraScript(" $('#DivCancelar').modal('hide'); ")
|
||||
CargaDatos()
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
If ObjContabilidad.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
Str.AppendFormat("<a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", ObjContabilidad.ContaIdPoliza)
|
||||
|
||||
End If
|
||||
End If
|
||||
Alert(Str.ToString)
|
||||
Else
|
||||
ObjContabilidad.RollBack()
|
||||
|
||||
End If
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
@@ -1419,7 +1419,7 @@
|
||||
</td>
|
||||
<td><b>T.C.:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtTipoCambio" onkeyup="ConvertirDllsPesos();" runat="server" CssClass="form-control input-sm" MaxLength="7" Text="1" Enabled="true" Width="70px" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtTipoCambio" onkeyup="ConvertirDllsPesos();" runat="server" CssClass="form-control input-sm" MaxLength="7" Text="1" Enabled="true" Width="70px" ClientIDMode="Static" Readonly ="true"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVTipoCambio" runat="server" ControlToValidate="TxtTipoCambio" Display="None" ErrorMessage="El campo <b>''Tipo de Cambio''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoCambio" runat="server" HighlightCssClass="vco" TargetControlID="CVTipoCambio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" ID="LblTCValuacion" ToolTip="Última Valuación" Text="" Visible="false"></asp:Label>
|
||||
|
||||
@@ -20758,13 +20758,19 @@ Partial Class Ventas
|
||||
CalculaTotalesVenta(True)
|
||||
|
||||
|
||||
|
||||
'condicióon, en la que se verifica que el importe total de aplicación de la nota de crédito sea igual al del total de la nota de crédito, ej. saldo de la factura 1000.01 y la nota de crédito se generó po 1000.00
|
||||
If Not AplicaNCMasiva Then
|
||||
Dim TT As Decimal = TxtNCImporte.Text.ToDecimal
|
||||
If TT > TxtTotal.Text.ToDecimal Then TT = TxtTotal.Text.ToDecimal
|
||||
CargaNCDT(CveVenta, TT)
|
||||
End If
|
||||
|
||||
End If
|
||||
'verifica el tipo de cambio que se actualice
|
||||
If DdlMoneda.SelectedValue <> "1" Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString
|
||||
End If
|
||||
LblTCValuacion.Visible = False
|
||||
UpPS.Update()
|
||||
|
||||
LBNotaCredito.Visible = False
|
||||
|
||||
Reference in New Issue
Block a user