[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 252/323: PLANANC : fix bug when creating firs
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 252/323: PLANANC : fix bug when creating first plan |
Date: |
Wed, 14 Mar 2018 17:39:00 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 87f6fe7cf250475bc4eff2d511af78f8d378c485
Author: Dany De Bontridder <address@hidden>
Date: Sat Feb 24 13:40:42 2018 +0100
PLANANC : fix bug when creating first plan
---
include/anc_pa.inc.php | 16 ++++++++++------
include/class/anc_plan.class.php | 17 +++++++++++++++++
2 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/include/anc_pa.inc.php b/include/anc_pa.inc.php
index d721e64..a5461e0 100644
--- a/include/anc_pa.inc.php
+++ b/include/anc_pa.inc.php
@@ -52,7 +52,7 @@ if ($sa=="add_pa")
$ret.=HtmlInput::title_box(_('Nouveau plan'), 'anc_div_add', 'hide');
$ret.= '<form method="post">';
$ret.=dossier::hidden();
- $ret.= $new->form();
+ $ret.= $new->form_new();
$ret.= HtmlInput::hidden("sa", "pa_write");
$ret.=HtmlInput::submit("submit", _("Enregistre"));
$ret.=HtmlInput::button_hide("anc_div_add");
@@ -111,11 +111,12 @@ if ($sa=="pa_delete")
$delete->delete();
$sa="anc_menu";
}
-
-// show the detail
+//--------------------------------------------------------------------------------------------------
+// show the detail of an analytic axis (=plan)
+//
+//--------------------------------------------------------------------------------------------------
if ($sa=="pa_detail")
{
-
$pa_id=$http->get("pa_id","number");
$new=new Anc_Plan($cn, $pa_id);
@@ -127,9 +128,11 @@ if ($sa=="pa_detail")
$ret.= $new->form();
$ret.= $wSa;
+ $ret.="<p>";
$ret.=HtmlInput::button_anchor(_('Efface ce plan'), '',
'remove_analytic_plan',
'onclick="return
confirm_box(\'remove_analytic_plan\',\'Effacer ?\',function ()
{window.location=\'do.php?ac='.$_REQUEST['ac'].'&pa_id='.$_GET['pa_id'].'&sa=pa_delete&'.$str_dossier.'\';})"',
'smallbutton');
+ $ret.="</p>";
//---------------------------------------------------------------------
// Detail now
// Use Manage_Table
@@ -145,6 +148,7 @@ if ($sa=="pa_detail")
$accounting->set_callback("ajax_misc.php");
$accounting->add_json_param("op", "anc_accounting");
$accounting->add_json_param("pa_id", $pa_id);
+ $accounting->set_sort_column("po_name");
ob_start();
$accounting->display_table(" where pa_id = $1 order by po_name
",array($pa_id));
$accounting->create_js_script();
@@ -170,8 +174,8 @@ if ($sa=='anc_menu')
$url=http_build_query(array("sa"=>"add_pa","ac"=>$ac,
"gDossier"=>Dossier::id()));
echo '<div class="content">';
- echo '<TABLE>';
- echo '<TR><TD class="vert_mtitle">';
+ echo '<TABLE class="vert_mtitle">';
+ echo '<TR><TD class="first">';
echo '<a href="?'.$url.'">'._("Ajout d'un plan comptable").'</a>';
echo '</TD></TR>';
echo '</TABLE>';
diff --git a/include/class/anc_plan.class.php b/include/class/anc_plan.class.php
index f7ee135..b55e8a9 100644
--- a/include/class/anc_plan.class.php
+++ b/include/class/anc_plan.class.php
@@ -140,6 +140,23 @@ class Anc_Plan
$ret.=$wId->input();
return $ret;
}
+ /**
+ * @brief add a new plan
+ */
+ function form_new()
+ {
+ $wName=new IText("pa_name");
+ $wDescription=new IText("pa_description");
+ $wDescription->size=80;
+
+ $ret="<TABLE>";
+ $ret.='<tr>'.td(_('Nom')).'<td>'.$wName->input().'</td>'.'</tr>';
+
$ret.="<tr>".td(_('Description')).'<td>'.$wDescription->input().'</td>'."</tr>";
+ $ret.="</table>";
+ return $ret;
+
+
+ }
function isAppend()
{
$count=$this->db->get_value("select count(pa_id) from
plan_analytique");
- [Noalyss-commit] [noalyss] 196/323: Fix SQL, (continued)
- [Noalyss-commit] [noalyss] 196/323: Fix SQL, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 227/323: patch sql : remove commented code, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 225/323: Dashboard : Fix box, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 181/323: Task #0001535: TVA : réécriture du module CFGTVA, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 183/323: Task #0001536: Achat - Vente : n'utilisez que les codes TVA disponibles, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 215/323: Plugin : fix doc, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 213/323: Plugin : fix indent, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 234/323: Fix warning, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 230/323: index.css : CSS responsive, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 249/323: SQL Patch : correct syntax for new version, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 252/323: PLANANC : fix bug when creating first plan,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 226/323: Dashboard : remove dead code, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 217/323: Periode : fix bug, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 208/323: Missing file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 233/323: Backward comptability for SQL function, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 264/323: Category Aged Balance add a start date, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 269/323: typo, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 270/323: check if open_basedir is empty, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 170/323: indent, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 207/323: Missing file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 236/323: Merge tag 'rel6920', Dany De Bontridder, 2018/03/14