[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 27/30: Cosmetic : move tags in operation deta
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 27/30: Cosmetic : move tags in operation details, small cosmetic bug |
Date: |
Sat, 3 Dec 2022 08:35:15 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 97988bfeb8963646e91aabed2f588e789f1aa27f
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Dec 2 17:37:41 2022 +0100
Cosmetic : move tags in operation details, small cosmetic bug
---
include/class/acc_plan_mtable.class.php | 1 -
include/class/additional_tax.class.php | 6 +-
include/class/anticipation.class.php | 4 +-
include/class/fiche.class.php | 8 +-
include/compta_ods.inc.php | 189 ++++++++++++++----------------
include/compta_ven.inc.php | 2 +-
include/forecast.inc.php | 4 +-
include/lib/html_input.class.php | 2 +-
include/template/ledger_detail_ach.php | 19 +++
include/template/ledger_detail_bottom.php | 20 +---
include/template/ledger_detail_fin.php | 19 +++
include/template/ledger_detail_misc.php | 19 +++
include/template/ledger_detail_ven.php | 20 +++-
13 files changed, 180 insertions(+), 133 deletions(-)
diff --git a/include/class/acc_plan_mtable.class.php
b/include/class/acc_plan_mtable.class.php
index 97ea1a2e0..9b8a1c5fb 100644
--- a/include/class/acc_plan_mtable.class.php
+++ b/include/class/acc_plan_mtable.class.php
@@ -113,7 +113,6 @@ class Acc_Plan_MTable extends Manage_Table_SQL
echo '<td>';
$a_code=explode(",",$p_row[$v]);
$nb_code=count($a_code);
- echo \Noalyss\Dbg::hidden_info("card",$p_row);
for ($xx = 0;$xx < $nb_code;$xx++)
{
echo
HtmlInput::card_detail($a_code[$xx],'','style="display:inline"')."," ;
diff --git a/include/class/additional_tax.class.php
b/include/class/additional_tax.class.php
index 9f13df81f..cec720697 100644
--- a/include/class/additional_tax.class.php
+++ b/include/class/additional_tax.class.php
@@ -160,6 +160,7 @@ class Additional_Tax
*/
static function display_row($p_jrn_id, &$sum_euro, &$sum_currency,
$decalage = 0)
{
+ global $g_parameter;
$a_additional_tax = Additional_Tax::get_by_operation($p_jrn_id,
$sum_euro, $sum_currency);
$nb = count($a_additional_tax);
for ($i = 0; $i < $nb; $i++) {
@@ -168,7 +169,10 @@ class Additional_Tax
echo td($a_additional_tax[$i]->ac_accounting);
echo td($a_additional_tax[$i]->ac_label . " ( " .
$a_additional_tax[$i]->ac_rate . " %)");
echo td(nbm($a_additional_tax[$i]->tax_amount), 'class="num"');
- echo td("") . td("") . td("") . td("");
+ if ($g_parameter->MY_TVA_USE == 'Y')
+ echo td("") . td("") . td("") . td("");
+ else
+ echo td("") ;
for ($e = 0; $e < $decalage; $e++) {
echo td("");
}
diff --git a/include/class/anticipation.class.php
b/include/class/anticipation.class.php
index 81d925bd4..9ed971254 100644
--- a/include/class/anticipation.class.php
+++ b/include/class/anticipation.class.php
@@ -159,13 +159,13 @@ EOF;
$form.=HtmlInput::hidden('f_id', $this->getForecastId());
$form.=HtmlInput::hidden('ac', $ac);
- echo '<form method="get" id="form_del" onsubmit="return
confirm_box(this,content[\'47\'])" style="display:inline">';
+ echo '<form method="get" id="form_del" onsubmit="return
confirm_box(this,content[\'47\'])" style="display:inline-block">';
echo $form;
echo HtmlInput::hidden("action","del");
echo HtmlInput::submit('del_bt', _('Effacer'));
echo '</form>';
- echo '<form method="get" id="form_clone" onsubmit="return
confirm_box(this,content[\'47\']) " style="display:inline" >';
+ echo '<form method="get" id="form_clone" onsubmit="return
confirm_box(this,content[\'47\']) " style="display:inline-block" >';
echo $form;
echo HtmlInput::hidden("action","clone");
echo HtmlInput::submit("clone_bt",_("Clone"));
diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index 355b3befe..ef4a90e45 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -1368,7 +1368,7 @@ class Fiche
$odd="";
$odd = ($i % 2 == 0 ) ? ' odd ': ' even ';
- $accounting=$tiers->strAttribut(ATTR_DEF_ACCOUNT);
+ $accounting=$tiers->strAttribut(ATTR_DEF_ACCOUNT,0);
if ( ! empty($accounting) && $p_action == 'bank'
&& $amount['debit'] < $amount['credit']
&&
@@ -1393,9 +1393,9 @@ class Fiche
$r.="<TD> $e".$tiers->strAttribut(ATTR_DEF_QUICKCODE)."</A></TD>";
$r.="<TD sorttable_customkey=\"text{$accounting}\">
$e".$accounting."</TD>";
$r.="<TD>".h($tiers->strAttribut(ATTR_DEF_NAME))."</TD>";
- $r.="<TD>".h($tiers->strAttribut(ATTR_DEF_ADRESS).
- " ".$tiers->strAttribut(ATTR_DEF_CP).
- " ".$tiers->strAttribut(ATTR_DEF_PAYS)).
+ $r.="<TD>".h($tiers->strAttribut(ATTR_DEF_ADRESS,0).
+ " ".$tiers->strAttribut(ATTR_DEF_CP,0).
+ " ".$tiers->strAttribut(ATTR_DEF_PAYS,0)).
"</TD>";
$r.='<td>'.linkTo($tiers->strAttribut(ATTR_DEF_WEBSITE,0)).'</td>';
$str_deb=(($amount['debit']==0)?0:nbm($amount['debit']));
diff --git a/include/compta_ods.inc.php b/include/compta_ods.inc.php
index 83952b504..a749e448b 100644
--- a/include/compta_ods.inc.php
+++ b/include/compta_ods.inc.php
@@ -27,25 +27,24 @@
* quant_purchase and quant_sold are not changed by this
*
*/
-if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
-require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
-require_once NOALYSS_INCLUDE.'/lib/function_javascript.php';
+if (!defined('ALLOWED')) die('Appel direct ne sont pas permis');
+require_once NOALYSS_INCLUDE . '/lib/ac_common.php';
+require_once NOALYSS_INCLUDE . '/lib/function_javascript.php';
-global $g_user,$http;
+global $g_user, $http;
$cn = Dossier::connect();
-$id_predef = $http->request('p_jrn_predef','number',-1);
-$id_ledger = $http->request('p_jrn','number',$id_predef);
+$id_predef = $http->request('p_jrn_predef', 'number', -1);
+$id_ledger = $http->request('p_jrn', 'number', $id_predef);
$ledger = new Acc_Ledger($cn, $id_ledger);
$first_ledger = $ledger->get_first('ODS');
-if ( empty ($first_ledger))
-{
- exit( '<span class="warning">'.
- _('Pas de journal disponible').
- '</span>');
+if (empty ($first_ledger)) {
+ exit('<span class="warning">' .
+ _('Pas de journal disponible') .
+ '</span>');
}
$ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id_ledger;
@@ -54,105 +53,91 @@ $def = -1;
$ledger->with_concerned = true;
-
-
-if ($g_user->check_jrn($ledger->id) == 'X')
-{
- NoAccess();
- exit - 1;
+if ($g_user->check_jrn($ledger->id) == 'X') {
+ NoAccess();
+ exit - 1;
}
-$p_msg="";
-if (!isset($_POST['summary']) && !isset($_POST['save']))
-{
- require NOALYSS_INCLUDE.'/operation_ods_new.inc.php';
- return;
-}
-elseif (isset($_POST['summary']))
-{
+$p_msg = "";
+if (!isset($_POST['summary']) && !isset($_POST['save'])) {
+ require NOALYSS_INCLUDE . '/operation_ods_new.inc.php';
+ return;
+} elseif (isset($_POST['summary'])) {
try {
$ledger->verify_operation($_POST);
- require_once NOALYSS_INCLUDE.'/operation_ods_confirm.inc.php';
- } catch (Exception $e)
- {
+ require_once NOALYSS_INCLUDE . '/operation_ods_confirm.inc.php';
+ } catch (Exception $e) {
echo alert($e->getMessage());
- $p_msg=$e->getMessage();
- require_once NOALYSS_INCLUDE.'/operation_ods_new.inc.php';
+ $p_msg = $e->getMessage();
+ require_once NOALYSS_INCLUDE . '/operation_ods_new.inc.php';
}
return;
-}
-elseif (isset($_POST['save']))
-{
- $array = $_POST;
- echo '<div class="content">';
- try
- {
- $ledger->save($array);
- $jr_id=$ledger->jr_id;
-
- /* save followup */
-
$ledger->save_followup($http->request("action_gestion","string",""));
-
-
- echo '<h2>'._("Opération enregistrée")._("Piece") .
h($ledger->pj) . '</h2>';
- if (strcmp($ledger->pj, $_POST['e_pj']) != 0)
- {
- echo '<h3 class="notice">' . _('Attention numéro pièce
existante, elle a du être adaptée') .
- '</h3>';
- }
- printf('<a class="detail" style="display:inline"
href="javascript:modifyOperation(%d,%d)">%s</a><hr>',
- $jr_id, dossier::id(), $ledger->internal);
-
- // show feedback
- echo '<div id="jrn_name_div">'; echo '<h1 id="jrn_name"
style="display:inline">' .
- $ledger->get_name() . '</h1>'; echo '</div>';
- echo $ledger->confirm($_POST, true);
- // extourne
- if (isset($_POST['reverse_ck']))
- {
- $p_date=$http->post('reverse_date',"string", '');
- $p_msg=$http->post("ext_label");
- if (isDate($p_date)==$p_date)
- {
- // reverse the operation
- try
- {
- $ledger->reverse($p_date,$p_msg);
- echo '<p>';
- echo _('Extourné au ').$p_date;
- echo '</p>';
- }
- catch (Exception $e)
- {
- echo '<span class="warning">'._('Opération non
extournée').
- $e->getMessage().
- '</span>';
-
- }
- }
- else
- {
- // warning because date is invalid
- echo '<span class="warning">'._('Date invalide,
opération non extournée').'</span>';
- }
- }
- echo '<ul class="aligned-block">';
- echo "<li>";
- echo $ledger->button_new_operation();
- echo "</li>";
- echo "<li>";
- echo $ledger->button_copy_operation();
- echo "</li>";
- echo "</ul>";
- }
- catch (Exception $e)
- {
- require NOALYSS_INCLUDE.'/operation_ods_new.inc.php';
- alert($e->getMessage());
- $p_msg=$e->getMessage();
- }
+} elseif (isset($_POST['save'])) {
+ $array = $_POST;
+ echo '<div class="content">';
+ try {
+ $ledger->save($array);
+ $jr_id = $ledger->jr_id;
+
+ /* save followup */
+ $ledger->save_followup($http->request("action_gestion", "string", ""));
+
+
+ echo '<h2>' . _("Opération enregistrée") ." ". _("Piece") ." ".
h($ledger->pj) . '</h2>';
+ if (strcmp($ledger->pj, $_POST['e_pj']) != 0) {
+ echo '<h3 class="notice">' . _('Attention numéro pièce existante,
elle a du être adaptée') .
+ '</h3>';
+ }
+ echo '<div style="margin-left:3rem">';
+ echo _("Détail opération");
+ echo " ";
+ printf('<a class="detail" style="display:inline"
href="javascript:modifyOperation(%d,%d)">%s</a><hr>',
+ $jr_id, dossier::id(), $ledger->internal);
+ echo '</div>';
+
+ // show feedback
+ echo '<div id="jrn_name_div">';
+ echo '<h1 id="jrn_name" style="display:inline">' .
+ $ledger->get_name() . '</h1>';
echo '</div>';
- return;
+ echo $ledger->confirm($_POST, true);
+ // extourne
+ if (isset($_POST['reverse_ck'])) {
+ $p_date = $http->post('reverse_date', "string", '');
+ $p_msg = $http->post("ext_label");
+ if (isDate($p_date) == $p_date) {
+ // reverse the operation
+ try {
+ $ledger->reverse($p_date, $p_msg);
+ echo '<p>';
+ echo _('Extourné au ') . $p_date;
+ echo '</p>';
+ } catch (Exception $e) {
+ echo '<span class="warning">' . _('Opération non
extournée') .
+ $e->getMessage() .
+ '</span>';
+
+ }
+ } else {
+ // warning because date is invalid
+ echo '<span class="warning">' . _('Date invalide, opération
non extournée') . '</span>';
+ }
+ }
+ echo '<ul class="aligned-block">';
+ echo "<li>";
+ echo $ledger->button_new_operation();
+ echo "</li>";
+ echo "<li>";
+ echo $ledger->button_copy_operation();
+ echo "</li>";
+ echo "</ul>";
+ } catch (Exception $e) {
+ require NOALYSS_INCLUDE . '/operation_ods_new.inc.php';
+ alert($e->getMessage());
+ $p_msg = $e->getMessage();
+ }
+ echo '</div>';
+ return;
}
return;
diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php
index 732cd72b2..0def7c302 100644
--- a/include/compta_ven.inc.php
+++ b/include/compta_ven.inc.php
@@ -274,7 +274,7 @@ try
echo HtmlInput::hidden("ledger_type", "VEN");
echo HtmlInput::hidden("ac", $strac);
echo HtmlInput::hidden("sa", "p");
- $action_id=$http->get('ag_id',"number");
+ $action_id=$http->get('ag_id',"string","");
echo HtmlInput::hidden("action_gestion",$action_id);
echo $Ledger->input($array);
echo '<div class="content">';
diff --git a/include/forecast.inc.php b/include/forecast.inc.php
index 6eef9ff19..a77a3db0d 100644
--- a/include/forecast.inc.php
+++ b/include/forecast.inc.php
@@ -138,7 +138,7 @@ if ($sa=="vw")
echo HtmlInput::hidden('ac', $ac);
$href=http_build_query(array('ac'=>$ac, 'gDossier'=>Dossier::id()));
- echo '<a style="display:inline" class="smallbutton"
href="do.php?'.$href.'">'._('Retour').'</a>';
+ echo '<a style="display:inline-block" class="smallbutton"
href="do.php?'.$href.'">'._('Retour').'</a>';
echo '</form>';
echo '</div>';
echo '</div>';
@@ -196,4 +196,4 @@ if ($sa=='list')
return;
}
?>
-</div>
\ No newline at end of file
+</div>
diff --git a/include/lib/html_input.class.php b/include/lib/html_input.class.php
index 167e53264..f44cd7f45 100755
--- a/include/lib/html_input.class.php
+++ b/include/lib/html_input.class.php
@@ -249,7 +249,7 @@ class HtmlInput
$href="";
if ($p_value!="")
$href=sprintf(' href ="%s" ', $p_value);
- $r=sprintf('<span id="%s" > <A class="'.$p_class.'"
style="display:inline;" %s %s >%s</A></span>',
+ $r=sprintf('<span id="%s" > <A class="'.$p_class.'"
style="display:inline-block;" %s %s >%s</A></span>',
$p_name, $href, $p_javascript, $p_label);
return $r;
}
diff --git a/include/template/ledger_detail_ach.php
b/include/template/ledger_detail_ach.php
index d418526e4..87997d6b8 100644
--- a/include/template/ledger_detail_ach.php
+++ b/include/template/ledger_detail_ach.php
@@ -104,6 +104,25 @@ global $div,$g_parameter,$cn,$access,$jr_id,$obj;
</td>
</tr>
+ <tr>
+ <td>
+ <div id="operation_tag_td<?=$div?>">
+ <?php
+
/******************************************************************************************************************
+ * Tags on operation
+
*****************************************************************************************************************/
+ $tag_operation=new Tag_Operation($cn);
+
$tag_operation->set_jrn_id($obj->det->jr_id);
+ $tag_operation->tag_cell($div);
+ ?>
+
+ <?php
+ // Button add tags
+ if ( $access=='W') { echo
Tag_Operation::button_search($obj->det->jr_id,$div);}
+ ?>
+ </div>
+ </td>
+ </tr>
</table>
</td>
</tr>
diff --git a/include/template/ledger_detail_bottom.php
b/include/template/ledger_detail_bottom.php
index 6dbd1d3e1..73c434aed 100644
--- a/include/template/ledger_detail_bottom.php
+++ b/include/template/ledger_detail_bottom.php
@@ -43,7 +43,7 @@
$a_tab['linked_operation_div']=array('id'=>'linked_operation_div'.$div,'label'=>
$a_tab['document_operation_div']=array('id'=>'document_operation_div'.$div,'label'=>_('Document').'('.$nb_document.')','display'=>'block');
$a_tab['linked_action_div']=array('id'=>'linked_action_div'.$div,'label'=>_('Actions
Gestion').'('.count($a_followup).')','display'=>'none');
$a_tab['analytic_div']=array('id'=>'analytic_div'.$div,'label'=>_('Comptabilité
Analytique'),'display'=>'none');
-$a_tab['tag_operation_div']=array('id'=>'tag_operation_div'.$div,'label'=>_('Etiquette'),'display'=>'none');
+
// show tabs
@@ -316,23 +316,7 @@ require_once NOALYSS_TEMPLATE.'/ledger_detail_file.php';
</span>
<?php endif;?>
</div>
-<div id="tag_operation_div<?=$div?>" style="overflow:auto;display:<?php echo
$a_tab['tag_operation_div']['display']?>">
- <div id="operation_tag_td<?=$div?>">
- <?php
-
/******************************************************************************************************************
- * Tags on operation
-
*****************************************************************************************************************/
- $tag_operation=new Tag_Operation($cn);
- $tag_operation->set_jrn_id($obj->det->jr_id);
- $tag_operation->tag_cell($div);
- ?>
-
- </div>
- <?php
- // Button add tags
- if ( $access=='W') { echo
Tag_Operation::button_search($obj->det->jr_id,$div);}
- ?>
-</div>
+
<hr>
<?php
echo '<p style="text-align:center">';
diff --git a/include/template/ledger_detail_fin.php
b/include/template/ledger_detail_fin.php
index a262ec0b6..0b515cc78 100644
--- a/include/template/ledger_detail_fin.php
+++ b/include/template/ledger_detail_fin.php
@@ -84,6 +84,25 @@ echo td(_('Pièce')).td($itext->input());
</td>
</tr>
+ <tr>
+ <td>
+ <div id="operation_tag_td<?=$div?>">
+ <?php
+
/******************************************************************************************************************
+ * Tags on operation
+
*****************************************************************************************************************/
+ $tag_operation=new Tag_Operation($cn);
+
$tag_operation->set_jrn_id($obj->det->jr_id);
+ $tag_operation->tag_cell($div);
+ ?>
+
+ <?php
+ // Button add tags
+ if ( $access=='W') { echo
Tag_Operation::button_search($obj->det->jr_id,$div);}
+ ?>
+ </div>
+ </td>
+ </tr>
</table>
</td>
diff --git a/include/template/ledger_detail_misc.php
b/include/template/ledger_detail_misc.php
index 46f94bdcc..029e7d293 100644
--- a/include/template/ledger_detail_misc.php
+++ b/include/template/ledger_detail_misc.php
@@ -78,6 +78,25 @@ require_once NOALYSS_TEMPLATE.'/ledger_detail_top.php';
</td>
</tr>
+ <tr>
+ <td>
+ <div id="operation_tag_td<?=$div?>">
+ <?php
+
/******************************************************************************************************************
+ * Tags on operation
+
*****************************************************************************************************************/
+ $tag_operation=new Tag_Operation($cn);
+
$tag_operation->set_jrn_id($obj->det->jr_id);
+ $tag_operation->tag_cell($div);
+ ?>
+
+ <?php
+ // Button add tags
+ if ( $access=='W') { echo
Tag_Operation::button_search($obj->det->jr_id,$div);}
+ ?>
+ </div>
+ </td>
+ </tr>
</table>
</td>
diff --git a/include/template/ledger_detail_ven.php
b/include/template/ledger_detail_ven.php
index 7581ee836..577d5db96 100644
--- a/include/template/ledger_detail_ven.php
+++ b/include/template/ledger_detail_ven.php
@@ -116,7 +116,25 @@ $str_anc = "";
</td>
</tr>
- </table>
+ <tr>
+ <td>
+ <div id="operation_tag_td<?=$div?>">
+ <?php
+
/******************************************************************************************************************
+ * Tags on operation
+
*****************************************************************************************************************/
+ $tag_operation=new Tag_Operation($cn);
+ $tag_operation->set_jrn_id($obj->det->jr_id);
+ $tag_operation->tag_cell($div);
+ ?>
+ <?php
+ // Button add tags
+ if ( $access=='W') { echo
Tag_Operation::button_search($obj->det->jr_id,$div);}
+ ?>
+ </div>
+ </td>
+ </tr>
+ </table>
</td>
</tr>
- [Noalyss-commit] [noalyss] branch master updated (1a1bcd567 -> 67f776cff), Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 07/30: Add __toString function for debugging purpose Improve DBG tools: print out or return a string, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 06/30: Cosmetic : waiting box, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 02/30: Bug : cosmetic , VAT in card is not aligned, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 25/30: Bug : missing class, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 18/30: Follow Up : can use enrich text for Comment and description, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 17/30: Merge branch 'dev9035-14', Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 19/30: Cosmetic, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 27/30: Cosmetic : move tags in operation details, small cosmetic bug,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 03/30: Improve Debug info presentation, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 09/30: New #0002216: Transformation d'une dépense Gestion en facture achat ou note de frais, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 29/30: Cosmetic : color, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 28/30: cosmetic, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 30/30: Cosmetic, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 04/30: Show tag in operations list, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 08/30: To let TOOLS plugin to add tag to operation, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 01/30: Bug : no filter on card for ledger PURCHASE, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 05/30: Cosmetic : display cards on one row in account search, Dany De Bontridder, 2022/12/03
- [Noalyss-commit] [noalyss] 11/30: Improve Test and set the Patch level to 181, Dany De Bontridder, 2022/12/03