Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop to Release #186

Merged
merged 5 commits into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions controllers/modificacion_presupuestal.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

documentopresupuestalmanager "github.com/udistrital/plan_cuentas_mid/managers/documentoPresupuestalManager"
movimientomanager "github.com/udistrital/plan_cuentas_mid/managers/movimientoManager"
errorctrl "github.com/udistrital/utils_oas/errorctrl"
"github.com/udistrital/utils_oas/responseformat"

"github.com/astaxie/beego"
Expand Down Expand Up @@ -146,6 +147,7 @@ func (c *ModificacionPresupuestalController) SimulacionAfectacion() {
// @Failure 403 :objectId is empty
// @router /:vigencia/:CG/:tipo [get]
func (c *ModificacionPresupuestalController) GetAllModificacionPresupuestalByVigenciaAndCG() {
defer errorctrl.ErrorControlController(c.Controller, "ModificacionPresupuestalController")
vigencia := c.GetString(":vigencia")
centroGestor := c.GetString(":CG")
tipoModificacion := c.GetString(":tipo")
Expand All @@ -169,6 +171,7 @@ func (c *ModificacionPresupuestalController) GetAllModificacionPresupuestalByVig
// @Failure 403 :objectId is empty
// @router get_one/:vigencia/:CG/:UUID [get]
func (c *ModificacionPresupuestalController) GetOneModificacionPresupuestalByVigenciaAndCG() {
defer errorctrl.ErrorControlController(c.Controller, "ModificacionPresupuestalController")
vigencia := c.GetString(":vigencia")
centroGestor := c.GetString(":CG")
UUID := c.GetString(":UUID")
Expand Down
2 changes: 2 additions & 0 deletions controllers/movimiento.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package controllers
import (
"encoding/json"

errorctrl "github.com/udistrital/utils_oas/errorctrl"
"github.com/udistrital/utils_oas/formatdata"
"github.com/udistrital/utils_oas/responseformat"

Expand Down Expand Up @@ -85,6 +86,7 @@ func (c *MovimientoController) Post() {
// @Failure 403 :objectId is empty
// @router /get_doc_by_mov_parentUUID/:vigencia/:CG/:UUID [get]
func (c *MovimientoController) GetAllAnulacionesByVigenciaCGAndUUID() {
defer errorctrl.ErrorControlController(c.Controller, "MovimientoController")
vigencia := c.GetString(":vigencia")
centroGestor := c.GetString(":CG")
documentUUID := c.GetString(":UUID")
Expand Down
2 changes: 2 additions & 0 deletions controllers/necesidad.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
necesidad_models "github.com/udistrital/necesidades_crud/models"
necesidadhelper "github.com/udistrital/plan_cuentas_mid/helpers/necesidadHelper"
"github.com/udistrital/plan_cuentas_mid/models"
errorctrl "github.com/udistrital/utils_oas/errorctrl"
"github.com/udistrital/utils_oas/request"
"github.com/udistrital/utils_oas/responseformat"
)
Expand Down Expand Up @@ -56,6 +57,7 @@ func (c *NecesidadController) GetFullNecesidad() {
// @Failure 403 body is empty
// @router /post_full_necesidad [post]
func (c *NecesidadController) PostFullNecesidad() {
defer errorctrl.ErrorControlController(c.Controller, "NecesidadController")
var (
v models.TrNecesidad
necesidad map[string]interface{}
Expand Down
3 changes: 3 additions & 0 deletions controllers/vigencia.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/astaxie/beego"
"github.com/astaxie/beego/logs"
vigenciahelper "github.com/udistrital/plan_cuentas_mid/helpers/vigenciaHelper"
errorctrl "github.com/udistrital/utils_oas/errorctrl"
)

// VigenciaController operations for vigencia
Expand All @@ -26,6 +27,7 @@ func (c *VigenciaController) URLMapping() {
// @Success 201 {object} models.SolicitudCDP
// @router /get_cierre/:vigencia/:area/:cerrada [get]
func (c *VigenciaController) GetCierreVigencia() {
defer errorctrl.ErrorControlController(c.Controller, "VigenciaController")
vigencia := c.Ctx.Input.Param(":vigencia")
areaf := c.Ctx.Input.Param(":area")
cerrada := c.Ctx.Input.Param(":cerrada") != "1"
Expand All @@ -48,6 +50,7 @@ func (c *VigenciaController) GetCierreVigencia() {
// @Success 201 {object} models.SolicitudCDP
// @router /cerrar_vigencia/:vigencia/:area [get]
func (c *VigenciaController) CerrarVigencia() {
defer errorctrl.ErrorControlController(c.Controller, "VigenciaController")
vigencia := c.Ctx.Input.Param(":vigencia")
areaf := c.Ctx.Input.Param(":area")
v, err := vigenciahelper.CerrarVigencia(vigencia, areaf)
Expand Down
3 changes: 2 additions & 1 deletion helpers/necesidadHelper/movimientopresu.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ func RealizarMovimiento(necesidad necesidad_models.Necesidad) (outputError map[s
fuentesp := fuentesi.([]map[string]interface{})
for _, fuentep := range fuentesp {
fuente := fuentep
sv, _ := strconv.Atoi(actividad["ActividadId"].(string))
if int(fuente["MontoParcial"].(float64)) > 0 {
mov1.Cuen_Pre, _ = utils.Serializar(map[string]interface{}{
"RubroId": valor.RubroId,
"ActividadId": actividad["ActividadId"].(string),
"ActividadId": sv,
"FuenteFinanciamientoId": fuente["FuenteId"].(string),
})
mov1.Mov_Proc_Ext = strconv.Itoa(movimientoext.Id)
Expand Down