48 static function build($p_search)
53 $currency_code=
$http->request(
"p_currency_code",
"string",
"0");
57 $card_category_id=
$http->request(
"card_category_id",
"string",
"0");
59 if ($p_search==
'by_card')
63 elseif ($p_search==
'by_accounting')
68 elseif ($p_search==
"by_category")
71 $currency_code,$card_category_id);
79 throw new Exception(
"PROC67 Invalid parameter");
108 $aData=$this->data_operation->get_data();
109 if ( empty ($aData)){
110 return h2(_(
"Aucune donnée"),
'class="error"');
114 $card_qcode=_(
"Fiche");
116 $internal=_(
"Internal");
117 $comment=_(
"Libellé");
119 $amount_currency=_(
"Mont. Devise");
120 $rate_ref=_(
"Taux de référence");
121 $rate=_(
"Taux utilisé");
123 $r=
HtmlInput::filter_table(
"pcur01_tb",
'0,1,2,3,4,5,6,7,8,9,10', 1);
125<
table id=
"pcur01_tb" class=
"result">
129 <
th>{$card_qcode}</
th>
135 <
th class=
"num">{$rate}</
th>
136 <
th class=
"num">{$rate_ref}</
th>
137 <
th class=
"num">{$amount_currency}</
th>
145 $r.=
td($aData[
$i][
'j_date']);
146 $r.=
td($aData[
$i][
'j_poste']);
147 $r.=
td($aData[
$i][
'fiche_qcode']);
148 $r.=
td($aData[
$i][
'jr_pj_number']);
149 $r.=
td($aData[
$i][
'jr_comment']);
153 $r.=
td($aData[
$i][
'currency_code_iso']);
154 $r.=
td(
nbm($aData[
$i][
'j_montant'],2),
'class="num"');
155 $r.=
td(round($aData[
$i][
'currency_rate'],4),
'class="num"');
156 $r.=
td(round($aData[
$i][
'currency_rate_ref'],4),
'class="num"');
157 $r.=
td(
nbm($aData[
$i][
'oc_amount'],4),
'class="num"');
169 $aData=$this->data_operation->get_data();
173 $card_qcode=_(
"Fiche");
175 $internal=_(
"Internal");
176 $comment=_(
"Libellé");
178 $amount_currency=_(
"Mont. Devise");
179 $rate_ref=_(
"Taux de référence");
180 $rate=_(
"Taux utilisé");
200 $export->add($aData[
$i][
'jr_pj_number']);
203 $export->add($aData[
$i][
'currency_code_iso']);
205 $export->add(round($aData[
$i][
'currency_rate'],4),
"number");
206 $export->add(round($aData[
$i][
'currency_rate_ref'],4),
"number");
h2($p_string, $p_class="", $raw="")
th($p_string, $p_extra='', $raw='')
tr($p_string, $p_extra='')
td($p_string='', $p_extra='')
surround the string with td
nbm($p_number, $p_dec=2)
format the number with a sep.
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
build the SQL and fetch data of data currency operation from database ,
filter data in currency from datase , inherit from Data_Currency_Operation, filter on a range of acco...
filter data in currency from datase , inherit from Data_Currency_Operation, filter on card category
filter data in currency froqm datase , inherit from Data_Currency_Operation, filter on a specific car...
manage the operation in currency : export CSV , output in HTML
getData_operation()
return Data_Currency_Operation with a possible filter
export_csv(Noalyss_CSV $export)
Output in CSV.
export_html()
Display in HTML.
__construct(Data_Currency_Operation $data_operation)
static build($p_search)
build a Print_Operation_Currency Object thanks the http request ($_REQUEST) with the right Filter
setData_operation($data_operation)
return Data_Currency_Operation with a possible filter
$print_operation_currency
if( $delta< 0) elseif( $delta==0)