This commit is contained in:
@@ -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 = DdlSubProyectos.DataSource
|
||||
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,8 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
TotalImportePrePoliza = TotalImporte
|
||||
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
|
||||
'Descuento = -(Descuento) ' se inverte el valor, va cargada
|
||||
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 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
|
||||
@@ -150,45 +170,60 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
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
|
||||
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 +245,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 +281,10 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
|
||||
End If
|
||||
|
||||
TxtComision.Text = ""
|
||||
TxtDescuento.Text = ""
|
||||
TxtIVA.Text = ""
|
||||
TxtComisionIntermediario.Text = ""
|
||||
ObjContabilidad.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user