Mantis #2451: Ajouter QCode des clients et fournisseurs dans objets du tableau de bord

This commit is contained in:
sparkyx 2026-03-03 19:31:39 +01:00
parent dd3b1b92a6
commit 3aca4a191e
3 changed files with 36 additions and 4 deletions

View file

@ -21,9 +21,7 @@
* \file
* \brief
*/
?>
<?php
$cn=\Dossier::connect();
echo HtmlInput::title_box($p_title, $this->dialog_box_id,"close","","y")
?>
@ -33,6 +31,7 @@ echo HtmlInput::title_box($p_title, $this->dialog_box_id,"close","","y")
<th><?php echo _('Date')?></th>
<th><?php echo _('Code Interne')?></th>
<th><?php echo _('Pièce')?></th>
<th><?php echo _('Tiers')?></th>
<th><?php echo _('Description')?></th>
<th>
<?php echo _('Montant')?>
@ -41,6 +40,17 @@ echo HtmlInput::title_box($p_title, $this->dialog_box_id,"close","","y")
</tr>
<?php
for ($i=0;$i<count($p_array);$i++):
$card_tiers=false;
if ( mb_substr($p_array[$i]['jr_internal'],0,1) =="A") {
$card_tiers=new \Fiche($cn
,$cn->get_value("select distinct qp_supplier from quant_purchase JOIN JRNX using (j_id) join jrn on (jr_grpt_id=j_grpt) where jrn.jr_id=$1"
,[$p_array[$i]['jr_id']]));
} else {
$card_tiers=new \Fiche($cn
,$cn->get_value("select distinct qs_client from quant_sold JOIN JRNX using (j_id) join jrn on (jr_grpt_id=j_grpt) where jrn.jr_id=$1"
,[$p_array[$i]['jr_id']]));
}
?>
<tr class="<?php echo (($i%2)==0)?'odd':'even';?>">
<td>
@ -52,6 +62,14 @@ echo HtmlInput::title_box($p_title, $this->dialog_box_id,"close","","y")
<td>
<?php echo h($p_array[$i]['jr_pj_number'])?>
</td>
<td>
<?php
if ($card_tiers != false )
{
echo \HtmlInput::card_detail($card_tiers->get_quick_code());
}
?>
</td>
<td>
<?php echo h($p_array[$i]['jr_comment']) ?>
</td>