cambio en todecimal y se agregó más texto a referencia
This commit is contained in:
@@ -268,7 +268,7 @@
|
||||
alert("No es posible poner una comision superior a lo seleccionado")
|
||||
}
|
||||
|
||||
if (comision > 0) {
|
||||
if (comision != 0) {
|
||||
$('#LblSubproyecto').css("display", "block");
|
||||
$('#divSubProyecto').css("display", "block");
|
||||
$('#LblClasificacion').css("display", "block");
|
||||
|
||||
@@ -41,7 +41,7 @@ Partial Class Bancos_DepositosCaja
|
||||
DdlSubProyectoDeposito.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectoDeposito.DataBind()
|
||||
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2)
|
||||
DdlClasificacion.DataBind()
|
||||
End Sub
|
||||
|
||||
@@ -71,20 +71,21 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
Dim TotalImporte As Decimal = 0
|
||||
Dim TotalImportePrePoliza As Decimal
|
||||
Dim Comision As Integer = IIf(TxtComision.Text.ToEntero > 0, TxtComision.Text.ToEntero, (TxtComision.Text.ToEntero * -1)).ToString.ToEntero
|
||||
Dim Comision As Decimal = TxtComision.Text.Todecimal
|
||||
|
||||
For Each Gvr As GridViewRow In GvFacturas.Rows
|
||||
If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal
|
||||
Next
|
||||
|
||||
If TotalImporte = 0 Then
|
||||
Alert("Seleccion una factura para realizar el deposito", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Seleccion una factura para realizar el depósito", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
TotalImportePrePoliza = TotalImporte
|
||||
If Comision > 0 Then
|
||||
TotalImporte = TotalImporte - TxtComision.Text.ToEntero
|
||||
If Comision <> 0 Then
|
||||
TotalImporte = TotalImporte + Comision
|
||||
Comision = -(Comision) ' se inverte el valor, va cargada
|
||||
If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then
|
||||
Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -126,28 +127,28 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
|
||||
'Salida de Caja Chica
|
||||
'Entrada a bancos
|
||||
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8)
|
||||
If Not FolioIE > 0 Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Comision > 0 Then
|
||||
CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
||||
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
|
||||
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TxtComision.Text.ToEntero, "Comisión", 51, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=TxtComision.Text.ToEntero * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
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, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
|
||||
If Comision <> 0 Then
|
||||
CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
||||
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Comision, "Comisión", 51, "Depósito Bancario ", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
Else OcurrioError = True
|
||||
End If
|
||||
Else
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
For Each Gvr As GridViewRow In GvFacturas.Rows
|
||||
@@ -156,7 +157,7 @@ Partial Class Bancos_DepositosCaja
|
||||
'Datos de las Nuevas PrePolizas
|
||||
'Entrada a Bancos
|
||||
|
||||
Dim Importe As Double = Gvr.DataKey("Importe").ToDouble
|
||||
Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal
|
||||
Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString
|
||||
|
||||
'Datos de las Prepolizas A Cancelar
|
||||
@@ -168,10 +169,10 @@ Partial Class Bancos_DepositosCaja
|
||||
If Not FolioIE > 0 Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, "Depósito Bancario", 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.ToDecimal, SerieFolio, 30, "Depósito Bancario", Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=Importe.ToDecimal * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
@@ -180,21 +181,20 @@ Partial Class Bancos_DepositosCaja
|
||||
OcurrioError = True
|
||||
End If
|
||||
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}")
|
||||
'documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Documento {1}</a>     ", CveIEDestino.ToString, SerieFolio)
|
||||
|
||||
'documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> <br/><br/> ", StrEncript, SerieFolio)
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
If OcurrioError Then
|
||||
ObjContabilidad.RollBack()
|
||||
Alert("Ocurrio un error al realizar los depositos", TipoMensaje.MsgError)
|
||||
Else
|
||||
ObjContabilidad.Commit()
|
||||
CargaDatos()
|
||||
|
||||
documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Prepóliza</a> <br/><br/> ", NuevaCvePrePoliza)
|
||||
|
||||
Alert(documentos.ToString)
|
||||
|
||||
Reference in New Issue
Block a user