[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 16/219: Update test with new architecture
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 16/219: Update test with new architecture |
Date: |
Mon, 18 Dec 2017 13:22:28 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 34f26e806019d31ab889b09f0980667c3f793d3b
Author: Dany De Bontridder <address@hidden>
Date: Sat Jul 22 20:13:07 2017 +0200
Update test with new architecture
---
scenario/ajax-add-card-category.php | 5 +-
scenario/ajax-detail-operation1.php | 4 +-
scenario/ajax-detail-operation2.php | 4 +-
scenario/ajax-detail-operation3.php | 4 +-
scenario/ajax-detail-operation4.php | 4 +-
scenario/ajax-save-operation.php | 3 +-
scenario/comptabilite_analytique.php | 2 +-
scenario/pdf_operation.php | 2 +-
scenario/scenario-1415995185.php | 2 +-
scenario/scenario-1415995188.php | 2 +-
scenario/scenario-1415995229.php | 2 +-
scenario/scenario-1415995238.php | 2 +-
scenario/scenario-1415995254.php | 2 +-
scenario/scenario-1415995262.php | 2 +-
scenario/scenario-1415995277.php | 7 +--
scenario/scenario-1415996970.php | 2 +-
scenario/test_manage_table_sql.php | 94 +++++++++++++++++++++---------------
17 files changed, 81 insertions(+), 62 deletions(-)
diff --git a/scenario/ajax-add-card-category.php
b/scenario/ajax-add-card-category.php
index 3988aeb..10aeab9 100644
--- a/scenario/ajax-add-card-category.php
+++ b/scenario/ajax-add-card-category.php
@@ -3,7 +3,8 @@
$_GET=array (
'gDossier' => '42',
'ctl' => 'select_card_div',
- 'op' => 'st',
+ 'op' => 'card',
+ 'op2'=>'st',
'fil' => '-1',
'ledger' => '2',
);
@@ -12,4 +13,4 @@ $_POST=array (
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
$_REQUEST=array_merge($_GET,$_POST);
-include 'ajax_card.php';
+include NOALYSS_HOME.'/ajax_misc.php';
diff --git a/scenario/ajax-detail-operation1.php
b/scenario/ajax-detail-operation1.php
index 8245ac1..8874afe 100644
--- a/scenario/ajax-detail-operation1.php
+++ b/scenario/ajax-detail-operation1.php
@@ -1,7 +1,7 @@
<?php
//@description:de Detail d'un achat
$_GET=array (
- 'gDossier' => '27',
+ 'op' => 'ledger',
'act' => 'de',
'jr_id' => '2856',
'div' => 'det2',
@@ -11,4 +11,4 @@ $_POST=array (
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
$_REQUEST=array_merge($_GET,$_POST);
-include 'ajax_ledger.php';
+include 'ajax_misc.php';
diff --git a/scenario/ajax-detail-operation2.php
b/scenario/ajax-detail-operation2.php
index 851d0f8..1ef2ce5 100644
--- a/scenario/ajax-detail-operation2.php
+++ b/scenario/ajax-detail-operation2.php
@@ -1,7 +1,7 @@
<?php
//@description:de Detail operation
$_GET=array (
- 'gDossier' => '27',
+ 'op' => 'ledger',
'act' => 'de',
'jr_id' => '2870',
'div' => 'det2',
@@ -11,4 +11,4 @@ $_POST=array (
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
$_REQUEST=array_merge($_GET,$_POST);
-include 'ajax_ledger.php';
+include 'ajax_misc.php';
diff --git a/scenario/ajax-detail-operation3.php
b/scenario/ajax-detail-operation3.php
index 9a99ed6..a145393 100644
--- a/scenario/ajax-detail-operation3.php
+++ b/scenario/ajax-detail-operation3.php
@@ -1,7 +1,7 @@
<?php
//@description:de Detail VEN
$_GET=array (
- 'gDossier' => '27',
+ 'op' => 'ledger',
'act' => 'de',
'jr_id' => '3532',
'div' => 'det2',
@@ -11,4 +11,4 @@ $_POST=array (
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
$_REQUEST=array_merge($_GET,$_POST);
-include 'ajax_ledger.php';
+include 'ajax_misc.php';
diff --git a/scenario/ajax-detail-operation4.php
b/scenario/ajax-detail-operation4.php
index aaa2428..92f1ca8 100644
--- a/scenario/ajax-detail-operation4.php
+++ b/scenario/ajax-detail-operation4.php
@@ -1,7 +1,7 @@
<?php
//@description:de Detail ODS
$_GET=array (
- 'gDossier' => '27',
+ 'op'=>"ledger",
'act' => 'de',
'jr_id' => '2826',
'div' => 'det2',
@@ -11,4 +11,4 @@ $_POST=array (
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
$_REQUEST=array_merge($_GET,$_POST);
-include 'ajax_ledger.php';
+include 'ajax_misc.php';
diff --git a/scenario/ajax-save-operation.php b/scenario/ajax-save-operation.php
index c12c38a..6149ee7 100644
--- a/scenario/ajax-save-operation.php
+++ b/scenario/ajax-save-operation.php
@@ -28,8 +28,9 @@ $_POST=array (
'rapt' => '',
'div' => 'det2',
'act' => 'save',
+ 'op'=>'ledger'
);
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
$_REQUEST=array_merge($_GET,$_POST);
-include 'ajax_ledger.php';
+include 'ajax_misc.php';
diff --git a/scenario/comptabilite_analytique.php
b/scenario/comptabilite_analytique.php
index 3daa71f..508a814 100644
--- a/scenario/comptabilite_analytique.php
+++ b/scenario/comptabilite_analytique.php
@@ -29,7 +29,7 @@ $a_jrnxId = $cn->get_array(
"select j_id from jrnx join jrn on (jr_grpt_id=j_grpt)
where
jr_id=$1
- ", array(4677));
+ ", array(48));
$nb = count($a_jrnxId);
for ($i = 0; $i<$nb; $i++) {
diff --git a/scenario/pdf_operation.php b/scenario/pdf_operation.php
index 655ed0e..9a513f9 100644
--- a/scenario/pdf_operation.php
+++ b/scenario/pdf_operation.php
@@ -22,7 +22,7 @@ require_once NOALYSS_INCLUDE."/class/pdf_operation.class.php";
-$pdf=new PDF_Operation ($cn,4677);
+$pdf=new PDF_Operation ($cn,61);
//$pdf=new PDF_Operation ($cn,47);
//$pdf=new PDF_Operation ($cn,4638);
diff --git a/scenario/scenario-1415995185.php b/scenario/scenario-1415995185.php
index 1accb43..d86305f 100644
--- a/scenario/scenario-1415995185.php
+++ b/scenario/scenario-1415995185.php
@@ -11,7 +11,7 @@ $_POST=array (
'gDossier' => '42',
'nb_item' => '2',
'p_jrn' => '2',
- 'e_date' => '14.11.2014',
+ 'e_date' => '14.11.2016',
'e_ech' => '',
'e_client' => 'CLIENT1 ',
'e_pj' => 'VEN1',
diff --git a/scenario/scenario-1415995188.php b/scenario/scenario-1415995188.php
index 5a4f1d2..5c119ee 100644
--- a/scenario/scenario-1415995188.php
+++ b/scenario/scenario-1415995188.php
@@ -13,7 +13,7 @@ $_POST=array (
'p_jrn' => '2',
'mt' => '1415995185.7619',
'e_comm' => 'Première vente',
- 'e_date' => '14.11.2014',
+ 'e_date' => '14.11.2016',
'e_ech' => '',
'e_pj' => 'VEN1',
'e_pj_suggest' => 'VEN1',
diff --git a/scenario/scenario-1415995229.php b/scenario/scenario-1415995229.php
index 89776e0..48501bb 100644
--- a/scenario/scenario-1415995229.php
+++ b/scenario/scenario-1415995229.php
@@ -8,7 +8,7 @@ $_POST=array (
'gDossier' => '42',
'nb_item' => '1',
'p_jrn' => '3',
- 'e_date' => '01.03.2014',
+ 'e_date' => '01.03.2016',
'e_ech' => '',
'e_client' => 'IMMOB',
'e_pj' => 'ACH1',
diff --git a/scenario/scenario-1415995238.php b/scenario/scenario-1415995238.php
index 82d40e5..1f96770 100644
--- a/scenario/scenario-1415995238.php
+++ b/scenario/scenario-1415995238.php
@@ -8,7 +8,7 @@ $_POST=array (
'gDossier' => '42',
'nb_item' => '1',
'p_jrn' => '3',
- 'e_date' => '01.01.2014',
+ 'e_date' => '01.01.2017',
'e_ech' => '',
'e_client' => 'IMMOB',
'e_pj' => 'ACH1',
diff --git a/scenario/scenario-1415995254.php b/scenario/scenario-1415995254.php
index 6f70f6b..063b755 100644
--- a/scenario/scenario-1415995254.php
+++ b/scenario/scenario-1415995254.php
@@ -10,7 +10,7 @@ $_POST=array (
'nb_item' => '1',
'p_jrn' => '3',
'e_comm' => 'Loyer',
- 'e_date' => '01.01.2014',
+ 'e_date' => '01.01.2017',
'e_ech' => '',
'jrn_type' => 'ACH',
'e_pj' => 'ACH1',
diff --git a/scenario/scenario-1415995262.php b/scenario/scenario-1415995262.php
index 8401f52..d801c3b 100644
--- a/scenario/scenario-1415995262.php
+++ b/scenario/scenario-1415995262.php
@@ -10,7 +10,7 @@ $_POST=array (
'gDossier' => '42',
'nb_item' => '10',
'p_jrn' => '3',
- 'e_date' => '01.01.2014',
+ 'e_date' => '01.01.2017',
'e_ech' => '',
'e_client' => 'IMMOB',
'e_pj' => 'ACH2',
diff --git a/scenario/scenario-1415995277.php b/scenario/scenario-1415995277.php
index 64dc924..a26270d 100644
--- a/scenario/scenario-1415995277.php
+++ b/scenario/scenario-1415995277.php
@@ -10,13 +10,14 @@ $_POST=array (
'gDossier' => '42',
'nb_item' => '10',
'p_jrn' => '3',
- 'e_date' => '01.02.2014',
+ 'e_date' => '01.02.2016',
'e_ech' => '',
- 'e_client' => 'IMMOB',
+ 'e_client' => 'DIV',
'e_pj' => 'ACH2',
'e_pj_suggest' => 'ACH2',
'e_comm' => 'Paiement loyer',
- 'e_march0' => 'LOYER',
+ 'e_march0' => 'FID15',
+ 'e_march0_label' => 'TEST',
'e_march0_price' => '2560.0000',
'e_quant0' => '1.0000',
'htva_march0' => '2560',
diff --git a/scenario/scenario-1415996970.php b/scenario/scenario-1415996970.php
index 335ec53..efb9764 100644
--- a/scenario/scenario-1415996970.php
+++ b/scenario/scenario-1415996970.php
@@ -8,7 +8,7 @@ $_POST=array (
'gDossier' => '42',
'ac' => 'COMPTA/MENUODS/ODS',
'p_jrn' => '4',
- 'e_date' => '14.11.2014',
+ 'e_date' => '14.11.2016',
'e_pj' => 'ODS1',
'e_pj_suggest' => 'ODS1',
'desc' => 'TVA',
diff --git a/scenario/test_manage_table_sql.php
b/scenario/test_manage_table_sql.php
index 7dc6193..d0a9f2b 100644
--- a/scenario/test_manage_table_sql.php
+++ b/scenario/test_manage_table_sql.php
@@ -22,66 +22,82 @@
//@description:Test the class manage_table_sql and javascript
$_GET=array (
- 'gDossier' => '10079',
);
$_POST=array (
);
$_POST['gDossier']=$gDossierLogInput;
$_GET['gDossier']=$gDossierLogInput;
$_REQUEST=array_merge($_GET,$_POST);
-require_once NOALYSS_INCLUDE."/database/menu_ref_sql.class.php";
+require_once NOALYSS_INCLUDE."/database/acc_plan_sql.class.php";
require_once NOALYSS_INCLUDE."/lib/manage_table_sql.class.php";
-$jrn=new Menu_Ref_SQL($cn);
+$jrn=new Acc_Plan_SQL($cn);
$manage_table=new Manage_Table_SQL($jrn);
-$manage_table->set_callback("ajax_misc.php");
+$manage_table->set_callback("ajax_test.php");
+
+echo $manage_table->get_json();
+echo " Function add_json_param : add param TestAjaxFile";
+$manage_table->add_json_param("TestAjaxFile",NOALYSS_HOME."/../scenario/ajax_manage_table_sql.php");
+echo " <br>";
+$r =json_decode($manage_table->get_json(),TRUE);
+if ( isset($r['TestAjaxFile']) && $r['TestAjaxFile'] ==
NOALYSS_HOME."/../scenario/ajax_manage_table_sql.php") { echo "$g_succeed ok
<br>";} else {echo "$g_failed not ok";}
+echo " <br>";
+
+
$manage_table->create_js_script();
-?>
-<script>
- <?php echo $manage_table->get_js_variable()?>.param_add({gDossier:"<?php
echo Dossier::id()?>"})
- </script>
-<?php
// Test the column header
-$manage_table->set_col_label('me_code', "Code");
-$manage_table->set_col_label('me_menu', "Menu");
-$manage_table->set_col_label('me_file', "Fichier");
-$manage_table->set_col_label('me_description', "Description");
-$manage_table->set_col_label('me_description_etendue', "Detail");
+$manage_table->set_col_label('pcm_val', "Poste");
+$manage_table->set_col_label('parent_accounting', "Dépend");
+$manage_table->set_col_label('pcm_lib', "Libellé");
+$manage_table->set_col_label('pcm_type', "Type de
menu".HtmlInput::infobulle(33));
// Change visible property
-$manage_table->set_property_visible("me_javascript", false);
-$manage_table->set_property_visible("me_url", false);
-
+function test_visible_update(Manage_Table_SQL
$p_manage_table,$p_property,$p_visible,$p_update) {
+ global $g_failed,$g_succeed;
+ // test visibility
+ $p_manage_table->set_property_visible($p_property, $p_visible);
+
+ echo "$p_property VISIBLE ($p_visible)"
.$p_manage_table->get_property_visible($p_property);
+ if ( $p_manage_table->get_property_visible($p_property) == $p_visible)
echo "$g_succeed OK"; else echo " $g_failed FAIL";echo "<br>";
+
+ // test update
+ echo "$p_property UPDATE ($p_update)"
.$p_manage_table->get_property_updatable($p_property);
+ $p_manage_table->set_property_updatable($p_property, $p_update);
+ if ( $p_manage_table->get_property_updatable($p_property) == $p_update)
echo "$g_succeed OK"; else echo "$g_failed FAIL";echo "<br>";
+}
+test_visible_update($manage_table, "pcm_type", FALSE, FALSE);
+test_visible_update($manage_table, "pcm_type", FALSE, TRUE);
+test_visible_update($manage_table, "pcm_type", TRUE, FALSE);
+test_visible_update($manage_table, "pcm_type", TRUE, TRUE);
+test_visible_update($manage_table, "parent_accounting", FALSE, FALSE);
+test_visible_update($manage_table, "parent_accounting", FALSE, TRUE);
+test_visible_update($manage_table, "parent_accounting", TRUE, FALSE);
+test_visible_update($manage_table, "parent_accounting", TRUE, TRUE);
+echo "<h1>"."Icon MODIFY place"."</h1>";
+echo "<h2>"." Mod left"."</h2>";
+$manage_table->set_icon_mod("left");
+$manage_table->display_table(" order by pcm_val::text limit 10");
-// Change update property
-$manage_table->set_property_updatable("me_type", false);
-$manage_table->set_property_updatable("me_parameter", false);
+echo "<h2>"." Mod right"."</h2>";
+$manage_table->set_icon_mod("right");
+$manage_table->display_table(" order by pcm_val::text limit 10");
-// Check
+echo "<h2>"." Mod first"."</h2>";
+$manage_table->set_icon_mod("first");
+$manage_table->display_table(" order by pcm_val::text limit 10");
-echo "me_javascript Visible (false)"
.$manage_table->get_property_visible("me_javascript");
-if ( ! $manage_table->get_property_visible("me_javascript")) echo "OK"; else
echo "FAIL";echo "<br>";
-echo "me_javascript updatable (true)"
.$manage_table->get_property_updatable("me_javascript");
-if ( $manage_table->get_property_updatable("me_javascript")) echo "OK"; else
echo "FAIL";echo "<br>";
-echo "me_url Visible (false)" .$manage_table->get_property_visible("me_url");
-if ( ! $manage_table->get_property_visible("me_url")) echo "OK"; else echo
"FAIL";echo "<br>";
-echo "me_url updatable (true)"
.$manage_table->get_property_updatable("me_url");
-if ( $manage_table->get_property_updatable("me_url")) echo "OK"; else echo
"FAIL";echo "<br>";
+echo "<h1>"."Icon DELETE place"."</h1>";
+echo "<h2>"." Delete left"."</h2>";
+$manage_table->set_icon_del("left");
+$manage_table->display_table(" order by pcm_val::text limit 10");
-echo "me_type Visible (true)" ;
-if ( $manage_table->get_property_visible("me_type")) echo "OK"; else echo
"FAIL";echo "<br>";
-echo "me_type updatable (false)" ;
-if ( ! $manage_table->get_property_updatable("me_type")) echo "OK"; else echo
"FAIL";echo "<br>";
+echo "<h2>"." Delete right"."</h2>";
+$manage_table->set_icon_del("right");
+$manage_table->display_table(" order by pcm_val::text limit 10");
-echo "me_parameter Visible (true)" ;
-if ( $manage_table->get_property_visible("me_parameter")) echo "OK"; else
echo "FAIL";echo "<br>";
-echo "me_parameter updatable (false)" ;
-if ( ! $manage_table->get_property_updatable("me_parameter")) echo "OK"; else
echo "FAIL";echo "<br>";
-$manage_table->display_table();
-
?>
- [Noalyss-commit] [noalyss] 62/219: Analytic : change the name and description in Ajax, (continued)
- [Noalyss-commit] [noalyss] 62/219: Analytic : change the name and description in Ajax, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 54/219: NEW : ICard , you can hide or show the accounting in the search box with the functions ICard->hide_accounting and ICard->show_accounting, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 67/219: Icon : for Inplace Edit field, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 166/219: Space, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 19/219: Replace global $http by new httpInput() to make the test of scenario working, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 128/219: Esthetic, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 99/219: CSS : button border, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 108/219: task #0001272: Rendre possible l'appel de la calculatrice depuis le fin fond d'une page., Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 174/219: space, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 114/219: Change max article in STOCK INV, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 16/219: Update test with new architecture,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 173/219: Improve calc, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 104/219: Réécriture de CFGPCMN pour utiliser ManageTable pas de delete proposé si compte utilisé, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 14/219: Infobulle : warning : esthetic, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 44/219: fix minor bug + doc, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 46/219: Manage_Table : Improve Javascript for adding / removing row of table, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 27/219: Task #0001443: opérations rapprochées : bug quand on utilise des tva avec autoliquidation Check with the view v_quant_detail and take into account the negative VAT, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 33/219: Task #0001324: Afficher la date (période) dans FSALDO, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 198/219: Task #001381 : reinitialize the search_form, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 154/219: Task #1440 CA - opération diverses inaccessibles Task #1370 les OD en comptabilité analytique - problème., Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 209/219: Merge branch 'master' of ns3:/srv/git/noalyss, Dany De Bontridder, 2017/12/18