Mantis #2451: Ajouter QCode des clients et fournisseurs dans objets du tableau de bord
This commit is contained in:
parent
dd3b1b92a6
commit
3aca4a191e
3 changed files with 36 additions and 4 deletions
|
|
@ -21,9 +21,7 @@
|
||||||
* \file
|
* \file
|
||||||
* \brief
|
* \brief
|
||||||
*/
|
*/
|
||||||
|
$cn=\Dossier::connect();
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
echo HtmlInput::title_box($p_title, $this->dialog_box_id,"close","","y")
|
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 _('Date')?></th>
|
||||||
<th><?php echo _('Code Interne')?></th>
|
<th><?php echo _('Code Interne')?></th>
|
||||||
<th><?php echo _('Pièce')?></th>
|
<th><?php echo _('Pièce')?></th>
|
||||||
|
<th><?php echo _('Tiers')?></th>
|
||||||
<th><?php echo _('Description')?></th>
|
<th><?php echo _('Description')?></th>
|
||||||
<th>
|
<th>
|
||||||
<?php echo _('Montant')?>
|
<?php echo _('Montant')?>
|
||||||
|
|
@ -41,6 +40,17 @@ echo HtmlInput::title_box($p_title, $this->dialog_box_id,"close","","y")
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
for ($i=0;$i<count($p_array);$i++):
|
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';?>">
|
<tr class="<?php echo (($i%2)==0)?'odd':'even';?>">
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -52,6 +62,14 @@ echo HtmlInput::title_box($p_title, $this->dialog_box_id,"close","","y")
|
||||||
<td>
|
<td>
|
||||||
<?php echo h($p_array[$i]['jr_pj_number'])?>
|
<?php echo h($p_array[$i]['jr_pj_number'])?>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
if ($card_tiers != false )
|
||||||
|
{
|
||||||
|
echo \HtmlInput::card_detail($card_tiers->get_quick_code());
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php echo h($p_array[$i]['jr_comment']) ?>
|
<?php echo h($p_array[$i]['jr_comment']) ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,12 @@ foreach ($array as $item):
|
||||||
if ( $aParam['time_limit'] == 'P' && $today->format('ymd')>$ech->format('ymd') )
|
if ( $aParam['time_limit'] == 'P' && $today->format('ymd')>$ech->format('ymd') )
|
||||||
continue;
|
continue;
|
||||||
$p++;
|
$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';
|
$class=($p&1)?' odd ':'even';
|
||||||
?>
|
?>
|
||||||
<div class="row <?=$class?>">
|
<div class="row <?=$class?>">
|
||||||
|
|
@ -45,6 +51,13 @@ foreach ($array as $item):
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<?=\HtmlInput::detail_op($item['jr_id'],$item['jr_pj_number'])?>
|
<?=\HtmlInput::detail_op($item['jr_id'],$item['jr_pj_number'])?>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<?php if ($card_tiers != false )
|
||||||
|
{
|
||||||
|
echo \HtmlInput::card_detail($card_tiers->get_quick_code());
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<?=h($item['jr_comment'])?>
|
<?=h($item['jr_comment'])?>
|
||||||
<?=h($item['jr_date'])?>
|
<?=h($item['jr_date'])?>
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class Invoice extends Widget
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
static function getConstantLimit() :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, '=');
|
$array = $acc_ledger->get_operation_date(date('d.m.Y'), $ledger_type, '=');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
include "invoice-display.php";
|
include "invoice-display.php";
|
||||||
$this->close_div();
|
$this->close_div();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue