Cosmetic number of Supplemental doc
This commit is contained in:
parent
5b05b841f0
commit
c39cd28075
5 changed files with 56 additions and 12 deletions
|
|
@ -4228,4 +4228,14 @@ h2.h-section {
|
||||||
.sect1 .highlight {
|
.sect1 .highlight {
|
||||||
background:wheat;
|
background:wheat;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.nb-round {
|
||||||
|
border-radius: 100%;
|
||||||
|
border:1px solid var(--bg-inner-box);
|
||||||
|
padding: 2px 4px;
|
||||||
|
font-size: min(70%,0.7rem);
|
||||||
|
background-color: var(--bg-inner-box);
|
||||||
|
margin-left: 2px;
|
||||||
|
color:navy;
|
||||||
}
|
}
|
||||||
|
|
@ -2090,7 +2090,7 @@ Supplement_Document.delete_document=function (nDossier,sDiv,nJS_ID,nJR_ID)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
id$("row_js_"+sDiv+"_"+nJS_ID).remove();
|
id$("row_js_"+sDiv+"_"+nJS_ID).remove();
|
||||||
|
Supplement_Document.refresh_list(nDossier,sDiv,nJR_ID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -2154,6 +2154,7 @@ Supplement_Document.save_file=function(form_dom_id)
|
||||||
{
|
{
|
||||||
waiting_box();
|
waiting_box();
|
||||||
var form_data=$(form_dom_id).serialize();
|
var form_data=$(form_dom_id).serialize();
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
var div=id$(form_dom_id).elements["div"].value;
|
var div=id$(form_dom_id).elements["div"].value;
|
||||||
// check size
|
// check size
|
||||||
|
|
@ -2199,8 +2200,12 @@ Supplement_Document.save_file=function(form_dom_id)
|
||||||
if (this.status === 200) {
|
if (this.status === 200) {
|
||||||
document.getElementById("supplement_div_list"+div).innerHTML += this.responseText ;
|
document.getElementById("supplement_div_list"+div).innerHTML += this.responseText ;
|
||||||
let dgbox=id$(form_dom_id).elements["dgbox"].value;
|
let dgbox=id$(form_dom_id).elements["dgbox"].value;
|
||||||
|
var json_form={} ;
|
||||||
|
json_form['gDossier']=id$(form_dom_id).elements['gDossier'].value;
|
||||||
|
json_form['div']=id$(form_dom_id).elements['div'].value;
|
||||||
|
json_form['jr_id']=id$(form_dom_id).elements['jr_id'].value;
|
||||||
|
Supplement_Document.refresh_list(json_form["gDossier"],json_form["div"],json_form["jr_id"]);
|
||||||
removeDiv(dgbox);
|
removeDiv(dgbox);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("supplement_div_list"+div).innerHTML += "status" + this.statusText + "<br/>";
|
document.getElementById("supplement_div_list"+div).innerHTML += "status" + this.statusText + "<br/>";
|
||||||
}
|
}
|
||||||
|
|
@ -2235,8 +2240,13 @@ Supplement_Document.refresh_list=function (nDossier,sDiv,nJR_id)
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
parameters: queryString,
|
parameters: queryString,
|
||||||
onSuccess: function (req) {
|
onSuccess: function (req) {
|
||||||
$("supplement_div_list"+sDiv).update(req.responseText);
|
var json=req.responseJSON;
|
||||||
|
$("supplement_div_list"+sDiv).update(json.html);
|
||||||
|
id$('doc_supp_'+sDiv).removeClassName("nb-round")
|
||||||
|
if ( json.count > 0) {
|
||||||
|
id$('doc_supp_'+sDiv).update(json.count);
|
||||||
|
id$('doc_supp_'+sDiv).addClassName("nb-round")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -658,8 +658,14 @@ EOF;
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
// refresh list of suppemental files
|
// refresh list of suppemental files
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
Acc_Document::display_supplementary_doc($cn, $http->get("div"), $http->get("jr_id"));
|
// @var $jr_id (int) JRN.JR_ID
|
||||||
|
$jr_id=$http->get("jr_id");
|
||||||
|
ob_start();
|
||||||
|
Acc_Document::display_supplementary_doc($cn, $http->get("div"), $jr_id);
|
||||||
|
$html= ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
$count=$cn->get_value("select count(*) from jrn_sup_document where jr_id=$1",[$jr_id]);
|
||||||
|
echo json_response(["html"=>$html,"count"=>$count]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$html = escape_xml($html);
|
$html = escape_xml($html);
|
||||||
|
|
|
||||||
|
|
@ -436,7 +436,7 @@ class Acc_Document extends Document {
|
||||||
<div class="row" id="<?=$rowid?>">
|
<div class="row" id="<?=$rowid?>">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<a href="<?=$download?>" download> <?=$item->js_filename?></a>
|
<a href="<?=$download?>" download> <?=$item->js_filename?></a>
|
||||||
</div>O
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<?=$item->js_description?>
|
<?=$item->js_description?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -33,19 +33,37 @@ $aRap=$oRap->get();
|
||||||
$periode_id=new Periode($cn,$detail->det->jr_tech_per);
|
$periode_id=new Periode($cn,$detail->det->jr_tech_per);
|
||||||
$exercice=$periode_id->get_exercice();
|
$exercice=$periode_id->get_exercice();
|
||||||
|
|
||||||
|
// @var $nb_document (int) number of doc
|
||||||
$nb_document=($detail->det->jr_pj_name != "")?1:0;
|
$nb_document=($detail->det->jr_pj_name != "")?1:0;
|
||||||
|
// @var $str_nb_doc (string) HTML span number of doc
|
||||||
|
$str_nb_doc=($nb_document==0)?span(""):span($nb_document,'class="nb-round"');
|
||||||
|
|
||||||
|
// @var $nb_aRap (int) number of reconciliation
|
||||||
$nb_aRap=(is_array($aRap))?count($aRap):0;
|
$nb_aRap=(is_array($aRap))?count($aRap):0;
|
||||||
|
// @var $str_nb_rap (string) HTML span for number of reconciliation
|
||||||
|
$str_nb_rap=($nb_aRap==0)?span(""):span($nb_aRap,'class="nb-round"');
|
||||||
|
|
||||||
|
//@var $nb_sup_doc (int) number of supplementary documents
|
||||||
|
$nb_sup_doc=$cn->get_value("select count(*) from jrn_sup_document where jr_id=$1",[$jr_id]);
|
||||||
|
|
||||||
|
// @var $str_nb_sup_doc (string) HTML span for the number of supplementary documents
|
||||||
|
$x=sprintf('id="%s_%s"',"doc_supp",$div);
|
||||||
|
$str_nb_sup_doc=($nb_sup_doc==0)?span("",$x):span($nb_sup_doc,'class="nb-round" '.$x);
|
||||||
|
|
||||||
|
// @var $nb_fu (int) number of event in follow-up
|
||||||
|
$nb_fu=count($a_followup);
|
||||||
|
// @var $str_nb_fu (string) HTML span for the number of followup
|
||||||
|
$str_nb_fu=($nb_fu==0)?span(""):span($nb_fu,'class="nb-round"');
|
||||||
|
|
||||||
// Array of tab
|
// Array of tab
|
||||||
//
|
//
|
||||||
$a_tab['writing_div']=array('id'=>'writing_div'.$div,'label'=>_('Ecriture Comptable'),'display'=>'none');
|
$a_tab['writing_div']=array('id'=>'writing_div'.$div,'label'=>_('Ecriture Comptable'),'display'=>'none');
|
||||||
$a_tab['info_operation_div']=array('id'=>'info_operation_div'.$div,'label'=>_('Information'),'display'=>'none');
|
$a_tab['info_operation_div']=array('id'=>'info_operation_div'.$div,'label'=>_('Information'),'display'=>'none');
|
||||||
$a_tab['linked_operation_div']=array('id'=>'linked_operation_div'.$div,'label'=>_('Opérations liées').'('.$nb_aRap.')','display'=>'none');
|
$a_tab['linked_operation_div']=array('id'=>'linked_operation_div'.$div,'label'=>_('Opérations liées').$str_nb_rap,'display'=>'none');
|
||||||
$a_tab['document_operation_div']=array('id'=>'document_operation_div'.$div,'label'=>_('Document').'('.$nb_document.')','display'=>'block');
|
$a_tab['document_operation_div']=array('id'=>'document_operation_div'.$div,'label'=>_('Document').$str_nb_doc,'display'=>'block');
|
||||||
$a_tab['linked_action_div']=array('id'=>'linked_action_div'.$div,'label'=>_('Actions Gestion').'('.count($a_followup).')','display'=>'none');
|
$a_tab['linked_action_div']=array('id'=>'linked_action_div'.$div,'label'=>_('Actions Gestion').$str_nb_fu,'display'=>'none');
|
||||||
$a_tab['analytic_div']=array('id'=>'analytic_div'.$div,'label'=>_('Comptabilité Analytique'),'display'=>'none');
|
$a_tab['analytic_div']=array('id'=>'analytic_div'.$div,'label'=>_('Comptabilité Analytique'),'display'=>'none');
|
||||||
$a_tab['supplemental_doc_div']=array('id'=>'supplemental_doc_div'.$div,'label'=>_('Documents supplémentaires'),'display'=>'none');
|
$a_tab['supplemental_doc_div']=array('id'=>'supplemental_doc_div'.$div,'label'=>_('Documents supplémentaires').$str_nb_sup_doc,'display'=>'none');
|
||||||
//var $g_parameter \Noalyss_Parameter_Folder
|
//var $g_parameter \Noalyss_Parameter_Folder
|
||||||
global $g_parameter;
|
global $g_parameter;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue