Fixe budget nouveau. Be able to add a new budget
authorwww-data <www-data@n3150.home>
Sun, 2 Jan 2022 21:43:32 +0000 (22:43 +0100)
committerwww-data <www-data@n3150.home>
Sun, 2 Jan 2022 21:43:32 +0000 (22:43 +0100)
app/compta/api_budget.php
app/compta/views/budget_nouveau.php

index 0f4ca6fe4e71f645f41a71a3c1365600ba20fbbd..e09f1a618727d17db6b89c7d46227795acf9be54 100644 (file)
@@ -24,7 +24,6 @@ class Budget extends Api {
     select bu_id, p.per_string, bu_desc from  Budget as b JOIN Period as p on b.bu_period_id = p.per_id order by p.per_string;
 __EOF;
       $res = $this->doQueryI($q);
-      error_log("getBudgets ".$this->db." Calls ".$res["total_matches"]);
       return $res['records'];
     }
 /**
index 80bb354fb20bfbc6f15c202a944f8b6a275349f1..0c6e3c990ee6e9d094dcd331881297a132e2ec4c 100644 (file)
@@ -57,13 +57,14 @@ requirejs(["require", "exports"
           , "cpt/Dialog"
           , "cpt/services"
           , "cpt/budget"], function (req,exp,ts,xj,xf,dlg,srv,myApp) {
-    console.log("starting Budget nouveau application...");
-    var Budget = myApp.Budget.Budget;
-    $('panel-budgets').addClassName('hidden');
-Prototype.Event.observe($("btBuApply"), "click", function () { 
-        console.log("btBuApply pushed");
+  console.log("starting Budget nouveau application...");
+  var Budget = new myApp.Budget.DlgBudget("budget",
+        "/app/compta/forms.php?panel=exercice",
+        "/app/compta/index.php");
+  $('panel-budgets').addClassName('hidden');
+  Prototype.Event.observe($("btBuApply"), "click", function () { 
        Budget.addBudget($("budget_anne").value,$('budget_desc').value);
-    });
+  });
 });
   </script>