-
This commit is contained in:
@@ -271,10 +271,18 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Beneficiario = "-1"
|
Beneficiario = "-1"
|
||||||
Actualizar = False
|
Actualizar = False
|
||||||
IdPoliza = -1
|
IdPoliza = -1
|
||||||
|
TipoPlantilla = -1
|
||||||
|
If IfNull(Request("Tipo"), "").ToString = "Ing" Then
|
||||||
|
TipoPlantilla = 1
|
||||||
|
LblEncabezado.Text = "Otros Ingresos"
|
||||||
|
End If
|
||||||
|
|
||||||
CargaPlantillas(TipoPlantilla)
|
CargaPlantillas(TipoPlantilla)
|
||||||
CargaConceptosContablesE()
|
CargaConceptosContablesE()
|
||||||
CargaModalConceptoCuentas()
|
CargaModalConceptoCuentas()
|
||||||
|
CargaConceptos()
|
||||||
|
CargaSubProyectos()
|
||||||
|
CargaCuentasBancos()
|
||||||
|
|
||||||
If IfNull(Request("Tipo"), "").ToString = "NOMPROV" Then
|
If IfNull(Request("Tipo"), "").ToString = "NOMPROV" Then
|
||||||
DivTipoGasto.Visible = True
|
DivTipoGasto.Visible = True
|
||||||
@@ -346,20 +354,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TipoPlantilla = -1
|
|
||||||
If IfNull(Request("Tipo"), "").ToString = "Ing" Then
|
|
||||||
TipoPlantilla = 1
|
|
||||||
LblEncabezado.Text = "Otros Ingresos"
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'If UsuarioActual.CveRol = 1 Then trNotificar.Visible = True
|
|
||||||
|
|
||||||
CargaConceptos()
|
|
||||||
CargaSubProyectos()
|
|
||||||
CargaCuentasBancos()
|
|
||||||
|
|
||||||
'crea tabla temporal
|
'crea tabla temporal
|
||||||
ArregloMovs = New ArrayList
|
ArregloMovs = New ArrayList
|
||||||
If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then
|
If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then
|
||||||
@@ -882,7 +876,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
e.Row.FCLinkButton("ImgBancos").Visible = True
|
e.Row.FCLinkButton("ImgBancos").Visible = True
|
||||||
|
|
||||||
If e.Row.DataKey("ContadoTipoTransaccion").ToEntero > 0 And e.Row.DataKey("ContadoCuenta").ToEntero > 0 And e.Row.DataKey("ContadoNumeroFolio").ToString.Length > 0 And
|
If e.Row.DataKey("ContadoTipoTransaccion").ToEntero > 0 And e.Row.DataKey("ContadoCuenta").ToEntero > 0 And e.Row.DataKey("ContadoNumeroFolio").ToString.Length > 0 And
|
||||||
e.Row.DataKey("ContadoImporte").ToDecimal > 0 And e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then
|
e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then
|
||||||
e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
|
e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -905,10 +899,17 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
TotalCargos = TxtTotalCargos.Text.ToDecimal
|
TotalCargos = TxtTotalCargos.Text.ToDecimal
|
||||||
TotalAbonos = TxtTotalAbonos.Text.ToDecimal
|
TotalAbonos = TxtTotalAbonos.Text.ToDecimal
|
||||||
Else
|
Else
|
||||||
For Each Gvr As GridViewRow In GvMov.Rows
|
If GvPrePoliza.Visible Then
|
||||||
TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal
|
For Each Gvr As GridViewRow In GvPrePoliza.Rows
|
||||||
TotalAbonos += Gvr.FCTextBox("TxtAbono").Text.ToDecimal
|
TotalCargos += Gvr.DataKey("Cargo").ToDecimal
|
||||||
Next
|
TotalAbonos += Gvr.DataKey("Abono").ToDecimal
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
For Each Gvr As GridViewRow In GvMov.Rows
|
||||||
|
TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal
|
||||||
|
TotalAbonos += Gvr.FCTextBox("TxtAbono").Text.ToDecimal
|
||||||
|
Next
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'validaciones
|
'validaciones
|
||||||
@@ -974,28 +975,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
'inserto las compras que voy a pagarDdlSaldos
|
'inserto las compras que voy a pagarDdlSaldos
|
||||||
For Each gvr As GridViewRow In Gv.Rows
|
For Each gvr As GridViewRow In Gv.Rows
|
||||||
|
|
||||||
'Registra movimieno bancario
|
|
||||||
If gvr.DataKey("CveConceptoContable").ToEntero = 30 AndAlso (gvr.DataKey("ContadoImporte").ToDecimal <> 0 OrElse TipoGrid = 1) Then
|
|
||||||
Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString
|
|
||||||
If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero)
|
|
||||||
|
|
||||||
Dim tCveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda").ToEntero
|
|
||||||
|
|
||||||
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text.ToDate, tFolio,
|
|
||||||
gvr.DataKey("ContadoBeneficiario"), gvr.DataKey("ContadoImporte").ToDecimal, tCveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "",
|
|
||||||
False, False, 0, CvePrePolizaInsertada, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
|
||||||
If CveIE < 0 Then
|
|
||||||
MsgError = "No se pudo registrar movimiento bancario"
|
|
||||||
Exit For
|
|
||||||
Else
|
|
||||||
If tFolio <> "0" Or tFolio <> "" Then
|
|
||||||
FolioIE = tFolio
|
|
||||||
Else
|
|
||||||
FolioIE = ObjIE.Folio
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
ImporteME = 0
|
ImporteME = 0
|
||||||
TipoCambio = 1
|
TipoCambio = 1
|
||||||
|
|
||||||
@@ -1035,6 +1014,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not gvr.DataKey("CveConceptoContable").Contiene("30", "10", "204") Then ' 30-bancos, 10-anticipos proveedores, 204- blancos complementaria
|
If Not gvr.DataKey("CveConceptoContable").Contiene("30", "10", "204") Then ' 30-bancos, 10-anticipos proveedores, 204- blancos complementaria
|
||||||
If gvr.DataKey("CveConceptoContable").ToEntero = 41 Then
|
If gvr.DataKey("CveConceptoContable").ToEntero = 41 Then
|
||||||
CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
|
CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
|
||||||
@@ -1043,6 +1023,29 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Registra movimieno bancario
|
||||||
|
If gvr.DataKey("CveConceptoContable").ToEntero = 30 Then
|
||||||
|
Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString
|
||||||
|
If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero)
|
||||||
|
|
||||||
|
Dim tCveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda").ToEntero
|
||||||
|
|
||||||
|
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text.ToDate, tFolio,
|
||||||
|
gvr.DataKey("ContadoBeneficiario"), Importe, tCveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "",
|
||||||
|
False, False, 0, CvePrePolizaInsertada, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
If CveIE < 0 Then
|
||||||
|
MsgError = "No se pudo registrar movimiento bancario"
|
||||||
|
Exit For
|
||||||
|
Else
|
||||||
|
If tFolio <> "0" Or tFolio <> "" Then
|
||||||
|
FolioIE = tFolio
|
||||||
|
Else
|
||||||
|
FolioIE = ObjIE.Folio
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Importe <> 0 OrElse TipoGrid = 1 Then 'si es diferente de cero o si viene de grid prepolizas, que registre todo
|
If Importe <> 0 OrElse TipoGrid = 1 Then 'si es diferente de cero o si viene de grid prepolizas, que registre todo
|
||||||
Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero
|
Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero
|
||||||
Dim tReferencia, tConcepto As String
|
Dim tReferencia, tConcepto As String
|
||||||
@@ -1688,8 +1691,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
|
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
|
||||||
dr("Concepto") = TxtConceptoE.Text
|
dr("Concepto") = TxtConceptoE.Text
|
||||||
dr("Referencia") = TxtReferenciaE.Text
|
dr("Referencia") = TxtReferenciaE.Text
|
||||||
dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDecimal) > 0, False, True)
|
dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDecimal) <> 0, False, True)
|
||||||
dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDecimal) > 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal)
|
dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDecimal) <> 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal)
|
||||||
dr("CveSubProyecto") = DdlSubProyectoE.SelectedValue
|
dr("CveSubProyecto") = DdlSubProyectoE.SelectedValue
|
||||||
dr("SubProyecto") = DdlSubProyectoE.SelectedItem.Text
|
dr("SubProyecto") = DdlSubProyectoE.SelectedItem.Text
|
||||||
dr("CveClasificacion") = DdlClasificacionesE.SelectedValue.ToEntero
|
dr("CveClasificacion") = DdlClasificacionesE.SelectedValue.ToEntero
|
||||||
@@ -1707,7 +1710,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
dr("ContadoNumeroFolio") = TxtModalConceptoDocumentoFolio.Text
|
dr("ContadoNumeroFolio") = TxtModalConceptoDocumentoFolio.Text
|
||||||
dr("ContadoBeneficiario") = TxtModalConceptoDocumentoBeneficiario.Text
|
dr("ContadoBeneficiario") = TxtModalConceptoDocumentoBeneficiario.Text
|
||||||
dr("ContadoObservaciones") = TxtModalConceptoDocumentoObservaciones.Text
|
dr("ContadoObservaciones") = TxtModalConceptoDocumentoObservaciones.Text
|
||||||
dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
|
'dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
|
||||||
|
|
||||||
If DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlComprasE.SelectedItem.ToString()
|
If DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlComprasE.SelectedItem.ToString()
|
||||||
If DdlVentasE.Visible = True AndAlso DdlVentasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlVentasE.SelectedItem.ToString()
|
If DdlVentasE.Visible = True AndAlso DdlVentasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlVentasE.SelectedItem.ToString()
|
||||||
@@ -1720,7 +1723,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
If DdlPorcentajeIVAE.Visible Then dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
|
If DdlPorcentajeIVAE.Visible Then dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
|
||||||
|
|
||||||
If TxtCargoE.Text <> "" Then
|
If TxtCargoE.Text <> "" AndAlso TxtCargoE.Text.ToDecimal <> 0 Then
|
||||||
dr("Cargo") = TxtCargoE.Text.ToDecimal : dr("Abono") = 0
|
dr("Cargo") = TxtCargoE.Text.ToDecimal : dr("Abono") = 0
|
||||||
Else
|
Else
|
||||||
dr("Abono") = TxtAbonoE.Text.ToDecimal : dr("Cargo") = 0
|
dr("Abono") = TxtAbonoE.Text.ToDecimal : dr("Cargo") = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user