Cosmetic : move tags in operation details, small cosmetic bug
This commit is contained in:
parent
a501c10054
commit
97988bfeb8
13 changed files with 179 additions and 132 deletions
|
|
@ -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"')."," ;
|
||||
|
|
|
|||
|
|
@ -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("");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -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']));
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
} elseif (isset($_POST['save'])) {
|
||||
$array = $_POST;
|
||||
echo '<div class="content">';
|
||||
try {
|
||||
$ledger->save($array);
|
||||
$jr_id = $ledger->jr_id;
|
||||
|
||||
// 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();
|
||||
}
|
||||
/* 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>';
|
||||
return;
|
||||
|
||||
// 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();
|
||||
}
|
||||
echo '</div>';
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -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">';
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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">';
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue