49 $this->afiche=$this->
cn->get_array(
"
50 with m as (select distinct qp_supplier as f_id from quant_purchase union select qs_client from quant_sold)
51 select distinct fiche.f_id as f_id ,f1.ad_value as name, f3.ad_value as first_name,f2.ad_value as quick_code
53 join m on (fiche.f_id=m.f_id)
54 join fiche_detail as f1 on (fiche.f_id=f1.f_id and f1.ad_id=1)
55 join fiche_detail as f2 on (fiche.f_id=f2.f_id and f2.ad_id=23)
56 left join fiche_detail as f3 on (fiche.f_id=f3.f_id and f3.ad_id=32)
64 $this->afiche[0][
'f_id']=
$fiche->id;
65 $this->afiche[0][
'quick_code']=
$fiche->get_quick_code();
70 $this->afiche=$this->
cn->get_array(
"
71 select distinct qp_supplier as f_id ,f1.ad_value as name, f3.ad_value as first_name,f2.ad_value as quick_code
72 from quant_purchase join
73 fiche_detail as f1 on (qp_supplier=f1.f_id and f1.ad_id=1)
74 join fiche_detail as f2 on (qp_supplier=f2.f_id and f2.ad_id=23)
75 left join fiche_detail as f3 on (qp_supplier=f3.f_id and f3.ad_id=32)
80 $this->afiche=$this->
cn->get_array(
"
81 select distinct qs_client as f_id ,f1.ad_value as name, f3.ad_value as first_name,f2.ad_value as quick_code
83 fiche_detail as f1 on (qs_client=f1.f_id and f1.ad_id=1)
84 join fiche_detail as f2 on (qs_client=f2.f_id and f2.ad_id=23)
85 left join fiche_detail as f3 on (qs_client=f3.f_id and f3.ad_id=32)
90 throw new Exception(
'Type invalide');
99 require NOALYSS_TEMPLATE.
'/balance_aged_result.php';
109 require NOALYSS_TEMPLATE.
'/balance_aged_result.php';
123 require NOALYSS_TEMPLATE.
'/balance_aged_result.php';
137 require NOALYSS_TEMPLATE.
'/balance_aged_result.php';
148 $header = array(_(
'QuickCode') ,
156 _(
'entre 30 et 60 jours'),
157 _(
'entre 60 et 90 jours'),
168 $card->set_parameter(
'start', $p_date_start);
170 if (empty(
$card->content))
181 $export->add($this->afiche[
$i][
'quick_code']);
183 $export->add($this->afiche[
$i][
'first_name']);
187 if (
$card->content[$j][
'jrn_def_type']==
'FIN'||
$card->content[$j][
'jrn_def_type']==
'ODS')
197 if (
$show&&
$card->content[$j][
'day_paid']<=30)
208 if (
$show&&
$card->content[$j][
'day_paid']>30&&
$card->content[$j][
'day_paid']<=60)
218 if (
$show&&
$card->content[$j][
'day_paid']>60&&
$card->content[$j][
'day_paid']<=90)
for($j=0;$j< $nb_row;$j++)($j%2==0)? 'even' $show
compute the ageing balance, currently this code is not used
display_sale($p_date_start, $p_let)
Display all the operation for the supplier.
get_array_card($p_type, $p_extra="")
display_category($p_date_start, $p_cat, $p_let)
display_card($p_date_start, $p_fiche, $p_let)
export_csv($p_date_start, $p_let)
Export Aged Balance to CSV.
display_purchase($p_date_start, $p_let)
Display all the operation for the customer.
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
only for operation retrieved thanks a quick_code manage the accounting entries for a given card
Manage the CSV : manage files and write CSV record.
const ATTR_DEF_FIRST_NAME
if(count($a_accounting)==0) $header