19?><?php require_once NOALYSS_TEMPLATE.
'/ledger_detail_top.php'; ?>
26 <form
class=
"print" onsubmit=
"return op_save(this);">
29 <?php echo HtmlInput::hidden(
'whatdiv',
$div) . HtmlInput::hidden(
'jr_id',
$jr_id) . dossier::hidden(); ?>
38 $date->setReadOnly(
true);
53 <?php echo
_(
"Date paiement")?>
57 $date_paid =
new IDate(
'p_date_paid');
59 echo $date_paid->input();
67 echo
td(
_(
'Fournisseur'));
80 $itext->value = strip_tags(
$obj->det->jr_pj_number);
88 $itext->value = strip_tags(
$obj->det->jr_comment??
"");
90 echo
td(
_(
'Libellé')) .
td(
$itext->input(),
' colspan="2" ');
108 <
td style=
"width:50%;height:100%;vertical-align:top;text-align: center">
109 <
table style=
"width:99%;height:8rem;vertical-align:top;">
111 <
td style=
"text-align:center;vertical-align: top">
114 $inote->set_enrichText(
"minimal");
116 $inote->style=
' class="itextarea" style="width:90%;height:100%;"';
126 <div
id=
"operation_tag_td<?=$div?>">
149 <
table class=
"result" style=
"margin-left:4px">
154 echo
th(
_(
'Quick Code'));
155 echo
th(
_(
'Description'));
157 echo
th(
_(
'Prix/Un.'),
'style="text-align:right"');
158 echo
th(
_(
'Quantité'),
'style="text-align:right"');
159 if (
$owner->MY_TVA_USE ==
'Y')
161 echo
th(
_(
'Taux TVA'),
'style="text-align:right"');
166 echo
th(
_(
'Non ded'),
'style="text-align:right"');
168 if (
$owner->MY_TVA_USE ==
'Y')
170 echo
th(
_(
'HTVA'),
'style="text-align:right"');
171 echo
th(
_(
'TVA ND'),
'style="text-align:right"');
172 echo
th(
_(
'TVA'),
'style="text-align:right"');
173 echo
th(
_(
'TVAC'),
'style="text-align:right"');
175 echo
th(
_(
'Total'),
'style="text-align:right"');
176 if (
$obj->det->currency_id != 0 ) {
177 $currency=
$obj->db->get_value(
"select cr_code_iso from currency where id=$1",
178 [
$obj->det->currency_id]);
181 if (
$owner->MY_ANALYTIC !=
'nu' )
184 $a_anc =
$anc->get_list(
' order by pa_id ');
198 '<th colspan="' .
$x .
'">'
199 .
_(
'Compt. Analytique') .Anc_Plan::hidden($a_anc).
206 for (
$e = 0;
$e < count(
$obj->det->array);
$e++)
216 if (
$owner->MY_TVA_USE ==
'Y' &&
$q[
'qp_vat_code'] !=
'')
221 $sym_tva =
h($tva->get_parameter(
'label'));
222 $x=(
$g_user->get_vat_code_preference()==1)?$tva->get_parameter(
'tva_code'):$tva->get_parameter(
'id');
223 $sym_tva .= sprintf(
'[%s]',
$x);
225 if (
$owner->MY_UPDLAB ==
'Y')
229 $input =
new IText(
"e_march" .
$q[
'j_id'] .
"_label", $l_lib);
230 $input->css_size =
"100%";
241 $row.=
td($sym_tva,
'style="text-align:center"');
243 $no_ded = bcadd(
$q[
'qp_dep_priv'],
$q[
'qp_nd_amount']);
244 $row.=
td(
nbm($no_ded),
' style="text-align:right"');
245 $htva =
$q[
'qp_price'];
249 $tva_rounded=round(
$q[
'qp_vat'],2);
250 $tvac = bcadd($htva, $tva_rounded);
251 $tvac = bcadd($tvac,
$q[
'qp_nd_tva']);
252 $tvac = bcadd($tvac,
$q[
'qp_nd_tva_recup']);
253 $tvac = bcsub ($tvac,
$q[
'qp_vat_sided']);
254 if (
$owner->MY_TVA_USE ==
'Y')
256 $tva_amount_nd = bcadd(
$q[
'qp_nd_tva_recup'],
$q[
'qp_nd_tva']);
258 if (
$q[
'qp_vat_sided'] <> 0)
260 $class =
' style="text-decoration:line-through"';
269 if (
$owner->MY_ANALYTIC !=
"nu" )
275 $anc_op->j_id =
$q[
'j_id'];
276 $anc_op->in_div=
$div;
277 $side=(
$q[
'j_debit'] ==
'f')?
'C':
'D';
294 $anl_extra=
$cn->get_array(
'select distinct j1.f_id,
299 from operation_analytique o1
300 join jrnx j1 on (o1.j_id=j1.j_id)
301 where oa_jrnx_id_source = $1',
303 if (count($anl_extra) > 0)
305 foreach ($anl_extra as $item_anl_extra) {
308 $anc_op->j_id =$item_anl_extra[
'j_id_anx'];
309 $anc_op->in_div=uniqid();
310 $side=($item_anl_extra[
'j_debit'] ==
'f')?
'C':
'D';
312 if ( $item_anl_extra[
'f_id'] !=
"") {
313 $n=
$cn->get_value(
'select ad_value from fiche_detail
327 $str_anc.=$anc_op->display_table(0, $htva, $anc_op->in_div);
335 $class=(
$e%2==0)?
' class="even"':
'class="odd"';
339 if (
$obj->det->currency_id != 0 ) {
340 $value=
$obj->db->get_value(
"select oc_amount+oc_vat_amount from operation_currency where j_id=$1",[
$q[
'j_id']]);
348 if (
$owner->MY_TVA_USE ==
'Y')
349 $row =
td(
_(
'Total'),
' style="font-style:italic;text-align:right;font-weight: bolder;width:auto" colspan="6"');
351 $row =
td(
_(
'Total'),
' style="font-style:italic;text-align:right;font-weight: bolder;width:auto" colspan="6"');
360 if (
$owner->MY_TVA_USE ==
'N') {
364 if (
$owner->MY_TVA_USE ==
'Y')
372 if (
$obj->det->currency_id !=
"" &&
$obj->det->currency_id > 0)
388 if (
$obj->det->currency_id !=
"" &&
$obj->det->currency_id > 0)
391 $four_space=
" ".
" ".
" ".
" ";
394 echo
_(
"Taux utilisé"),
" ",
nbm(
$obj->det->currency_rate,4),$four_space;
395 echo
_(
"Taux Réf"),
" ",
nbm(
$obj->det->currency_rate_ref,4).$four_space;
403require_once NOALYSS_TEMPLATE.
'/ledger_detail_bottom.php';
format_date($p_date, $p_from_format='YYYY-MM-DD', $p_to_format='DD.MM.YYYY')
format the date, when taken from the database the format is MM-DD-YYYY
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.
global $g_user
if no group available , then stop
h( $row[ 'oa_description'])
_("actif, passif,charge,...")
$class
Display the Plugin and for each profile were it is installed or not.
display currency , convert to euro , and save them if used.
static build($db, $p_code)
retrieve TVA rate thanks the code that could be the tva_id or tva_code.
static display_row($p_jrn_id, &$sum_euro, &$sum_currency, $decalage=0)
display the additional_tax in the ledger_detail for Sales and Purchase
this class is used to show the form for entering an operation only FOR analytic operation to save it,...
Concerns the Analytic plan (table plan_analytique)
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
Html Input : Input a date format dd.mm.yyyy The property title should be set to indicate what it is e...
Manage the TEXTAREA html element.
Class to manage the company parameter (address, name...)
concerns the tags linked to an accountancy writing
static button_search($p_jr, $p_div)
Show a button to select tag for Search.
$sum_add_tax
display additional tax if any + currency
$tag_operation
Tags on operation.