Mantis #2451: Ajouter QCode des clients et fournisseurs dans objets du tableau de bord
This commit is contained in:
parent
b8835be8f9
commit
b15625690b
3 changed files with 36 additions and 4 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -36,6 +36,12 @@ foreach ($array as $item):
|
|||
if ( $aParam['time_limit'] == 'P' && $today->format('ymd')>$ech->format('ymd') )
|
||||
continue;
|
||||
$p++;
|
||||
$card_tiers=false;
|
||||
if ( $ledger_type=="ACH") {
|
||||
$card_tiers=new \Fiche($this->db,$this->db->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",[$item['jr_id']]));
|
||||
} else {
|
||||
$card_tiers=new \Fiche($this->db,$this->db->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",[$item['jr_id']]));
|
||||
}
|
||||
$class=($p&1)?' odd ':'even';
|
||||
?>
|
||||
<div class="row <?=$class?>">
|
||||
|
|
@ -45,6 +51,13 @@ foreach ($array as $item):
|
|||
<div class="col-2">
|
||||
<?=\HtmlInput::detail_op($item['jr_id'],$item['jr_pj_number'])?>
|
||||
</div>
|
||||
<div>
|
||||
<?php if ($card_tiers != false )
|
||||
{
|
||||
echo \HtmlInput::card_detail($card_tiers->get_quick_code());
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="col">
|
||||
<?=h($item['jr_comment'])?>
|
||||
<?=h($item['jr_date'])?>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class Invoice extends Widget
|
|||
* @return array
|
||||
*/
|
||||
static function getConstantLimit() :array {
|
||||
return ['P' => _("Prochaines factures"), "R" => "facture en retard",'T'=>_("Aujourd'hui")];
|
||||
return ['P' => _("Prochaines factures"), "R" => _("facture en retard"),'T'=>_("Aujourd'hui")];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -113,6 +113,7 @@ class Invoice extends Widget
|
|||
$array = $acc_ledger->get_operation_date(date('d.m.Y'), $ledger_type, '=');
|
||||
break;
|
||||
}
|
||||
|
||||
include "invoice-display.php";
|
||||
$this->close_div();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue