Change Analytic Account by activity
Export CSV use the coma as decimal separator Underline the activity Sort the activity by name
This commit is contained in:
parent
ae49d6dedc
commit
2214242a0a
7 changed files with 33 additions and 34 deletions
|
|
@ -164,7 +164,6 @@ if ( $sub == 'ancgl')
|
|||
echo '</form>';
|
||||
if ( isset($_GET['result']))
|
||||
{
|
||||
// echo $gl->show_button($str_hidden);
|
||||
echo $gl->display_html();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ if ( isset($_REQUEST['sa']))
|
|||
$ret.=HtmlInput::hidden('sa','po_update');
|
||||
$ret.=HtmlInput::submit('Correction','Correction');
|
||||
$ret.=sprintf('<A class="mtitle" HREF="?p_action=ca_pa&sa=po_delete&po_id=%s&pa_id=%s&'.$str_dossier.'">'.
|
||||
'<input type="button" value="Efface" onClick="return confirm(\' Voulez-vous vraiment effacer ce poste\');"></A>',
|
||||
'<input type="button" value="Efface" onClick="return confirm(\' Voulez-vous vraiment effacer cette activité\');"></A>',
|
||||
$po->id,
|
||||
$_REQUEST['pa_id']
|
||||
);
|
||||
|
|
@ -195,7 +195,7 @@ if ( isset($_REQUEST['sa']))
|
|||
|
||||
$new=new Anc_Plan($cn,$_REQUEST['pa_id']);
|
||||
$new->get();
|
||||
$array=$new->get_poste_analytique();
|
||||
$array=$new->get_poste_analytique(" order by po_name");
|
||||
$ret.='<div class="u_redcontent">';
|
||||
$ret.='<table style="width:100%;border:solid blue 2px ;border-style:outset;">';
|
||||
$ret.="<tr>";
|
||||
|
|
@ -215,8 +215,8 @@ if ( isset($_REQUEST['sa']))
|
|||
$class="odd";
|
||||
|
||||
$ret.="<TR class=\"$class\">";
|
||||
$ret.="<TD>".
|
||||
'<a class="mtitle" href="?p_action=ca_pa&sa=po_detail&po_id='.$obj->id.'&pa_id='.$_REQUEST['pa_id'].'&'.
|
||||
$ret.="<TD >".
|
||||
'<a style="text-decoration:underline;" href="?p_action=ca_pa&sa=po_detail&po_id='.$obj->id.'&pa_id='.$_REQUEST['pa_id'].'&'.
|
||||
$str_dossier.'">'.
|
||||
h($obj->name).
|
||||
'</a>';
|
||||
|
|
@ -278,7 +278,7 @@ else
|
|||
'</TD>';
|
||||
echo '<td class="mtitle">'.
|
||||
'<a class="mtitle" href="?p_action=ca_pa&sa=list&pa_id='.$line['id'].'&'.$str_dossier.'">'.
|
||||
"Postes".
|
||||
"Activités".
|
||||
"</a>";
|
||||
|
||||
echo '</TR>';
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ class Anc_Acc_List extends Anc_Acc_Link
|
|||
$r=parent::display_form($p_hidden);
|
||||
$icard=new ISelect('card_poste');
|
||||
$icard->value=array(
|
||||
array('value'=>1,'label'=>'Par fiche /Poste Analytique'),
|
||||
array('value'=>2,'label'=>'Par poste comptable/Poste Analytique'),
|
||||
array('value'=>3,'label'=>'Par poste Analytique/Fiche'),
|
||||
array('value'=>4,'label'=>'Par poste Analytique/Poste Comptable')
|
||||
array('value'=>1,'label'=>'Par fiche /Activité'),
|
||||
array('value'=>2,'label'=>'Par poste comptable/Activité'),
|
||||
array('value'=>3,'label'=>'Par activité/Fiche'),
|
||||
array('value'=>4,'label'=>'Par activité/Poste Comptable')
|
||||
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -273,12 +273,12 @@ class Anc_Balance_Double extends Anc_Print
|
|||
{
|
||||
$r="";
|
||||
|
||||
$r.='"Poste comptable Analytique",';
|
||||
$r.='"Poste comptable Analytique",';
|
||||
$r.='"Debit",';
|
||||
$r.='"Credit",';
|
||||
$r.='"Solde",';
|
||||
$r.='"D/C",';
|
||||
$r.='"Poste comptable Analytique";';
|
||||
$r.='"Poste comptable Analytique";';
|
||||
$r.='"Debit";';
|
||||
$r.='"Credit";';
|
||||
$r.='"Solde";';
|
||||
$r.='"D/C"';
|
||||
|
||||
$r.="\r\n";
|
||||
|
||||
|
|
@ -291,11 +291,11 @@ class Anc_Balance_Double extends Anc_Print
|
|||
foreach ( $array as $row)
|
||||
{
|
||||
|
||||
$r.=sprintf('"%s",',$row['a_po_name']);
|
||||
$r.=sprintf('"%s",',$row['b_po_name']);
|
||||
$r.=sprintf("%12.2f,",$row['a_d']);
|
||||
$r.=sprintf("%12.2f,",$row['a_c']);
|
||||
$r.=sprintf("%12.2f,",$row['a_solde']);
|
||||
$r.=sprintf('"%s";',$row['a_po_name']);
|
||||
$r.=sprintf('"%s";',$row['b_po_name']);
|
||||
$r.=sprintf("%s;",nb($row['a_d']));
|
||||
$r.=sprintf("%s;",nb($row['a_c']));
|
||||
$r.=sprintf("%s;",nb($row['a_solde']));
|
||||
$r.=sprintf('"%s"',$row['a_debit']);
|
||||
$r.="\r\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,9 +191,9 @@ class Anc_Balance_Simple extends Anc_Print
|
|||
$row=$array[$i];
|
||||
$pdf->Cell(20,6,$row['po_id'],0,0,'L');
|
||||
$pdf->Cell(90,6,$row['po_name'],0,0,'L');
|
||||
$pdf->Cell(20,6,sprintf('%.2f',$row['sum_deb']),0,0,'R');
|
||||
$pdf->Cell(20,6,sprintf('%.2f',$row['sum_cred']),0,0,'R');
|
||||
$pdf->Cell(20,6,sprintf('%.2f',$row['solde']),0,0,'R');
|
||||
$pdf->Cell(20,6,sprintf('%s',nbm($row['sum_deb'])),0,0,'R');
|
||||
$pdf->Cell(20,6,sprintf('%s',nbm($row['sum_cred'])),0,0,'R');
|
||||
$pdf->Cell(20,6,sprintf('%s',nbm($row['solde'])),0,0,'R');
|
||||
$pdf->Cell(20,6,$row['debit'],0,0,'R');
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
|
@ -219,11 +219,11 @@ class Anc_Balance_Simple extends Anc_Print
|
|||
// the name and po_id
|
||||
$solde=($row['sum_cred']>$row['sum_deb'])?'C':'D';
|
||||
$solde=($row['sum_cred']==$row['sum_deb'])?'':$solde;
|
||||
$r.=sprintf("'%s',",$row['po_id']);
|
||||
$r.=sprintf("'%s',",$row['po_name']);
|
||||
$r.=sprintf("%12.2f,",$row['sum_deb']);
|
||||
$r.=sprintf("%12.2f,",$row['sum_cred']);
|
||||
$r.=sprintf("%12.2f,",$row['solde']);
|
||||
$r.=sprintf("'%s';",$row['po_id']);
|
||||
$r.=sprintf("'%s';",$row['po_name']);
|
||||
$r.=sprintf("%s;",nb($row['sum_deb']));
|
||||
$r.=sprintf("%s;",nb($row['sum_cred']));
|
||||
$r.=sprintf("%s;",nb($row['solde']));
|
||||
$r.=sprintf("'%s'",$row['debit']);
|
||||
$r.="\r\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,9 +140,9 @@ class Anc_Plan
|
|||
* Analytic plan
|
||||
* \return an array of Poste_analytic object
|
||||
*/
|
||||
function get_poste_analytique()
|
||||
function get_poste_analytique($p_order="")
|
||||
{
|
||||
$sql="select po_id from poste_analytique where pa_id=".$this->id;
|
||||
$sql="select po_id,po_name from poste_analytique where pa_id=".$this->id." $p_order";
|
||||
$r=$this->db->exec_sql($sql);
|
||||
$ret=array();
|
||||
if ( Database::num_row($r) == 0 )
|
||||
|
|
|
|||
|
|
@ -127,14 +127,14 @@ class Anc_Print
|
|||
|
||||
$poste=new IText();
|
||||
$poste->size=10;
|
||||
$r.=_("Entre le poste ").$poste->input("from_poste",$this->from_poste);
|
||||
$r.=_("Entre l'activité ").$poste->input("from_poste",$this->from_poste);
|
||||
$choose=new IButton();
|
||||
$choose->name=_("Choix Poste");
|
||||
$choose->label=_("Recherche");
|
||||
$choose->javascript="onClick=search_ca(".dossier::id().",'from_poste','pa_id')";
|
||||
$r.=$choose->input();
|
||||
|
||||
$r.=_(" et le poste ").$poste->input("to_poste",$this->to_poste);
|
||||
$r.=_(" et l'activité ").$poste->input("to_poste",$this->to_poste);
|
||||
$choose->javascript="onClick=search_ca(".dossier::id().",'to_poste','pa_id')";
|
||||
$r.=$choose->input();
|
||||
$r.='<span class="notice" style="display:block">'._('Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche').'</span>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue