31require
'../../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/compta/tva/class/tva.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
38require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
41$langs->loadLangs(array(
'compta',
'bills'));
43$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
44$massaction =
GETPOST(
'massaction',
'alpha');
46$confirm =
GETPOST(
'confirm',
'alpha');
47$cancel =
GETPOST(
'cancel',
'alpha');
48$toselect =
GETPOST(
'toselect',
'array');
49$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'salestaxeslist';
50$backtopage =
GETPOST(
'backtopage',
'alpha');
51$optioncss =
GETPOST(
'optioncss',
'alpha');
52$optioncss =
GETPOST(
'optioncss',
'aZ');
55$search_ref =
GETPOST(
'search_ref',
'alpha');
56$search_label =
GETPOST(
'search_label',
'alpha');
61$search_type =
GETPOST(
'search_type',
'intcomma');
62$search_account =
GETPOST(
'search_account',
'alpha');
63$search_amount =
GETPOST(
'search_amount',
'alpha');
64$search_status =
GETPOST(
'search_status',
'intcomma');
67$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
68$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
69$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOSTINT(
'page');
70if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
74$offset = $limit * $page;
79 $sortfield =
't.datev';
86 't.rowid' => array(
'checked' => 1,
'position' => 10,
'label' =>
"Ref",),
87 't.label' => array(
'checked' => 1,
'position' => 20,
'label' =>
"Label"),
88 't.datev' => array(
'checked' => 1,
'position' => 30,
'label' =>
"PeriodEndDate"),
89 't.fk_typepayment' => array(
'checked' => 1,
'position' => 50,
'label' =>
"DefaultPaymentMode"),
90 't.amount' => array(
'checked' => 1,
'position' => 90,
'label' =>
"Amount"),
91 't.datec' => array(
'checked' => 1,
'position' => 91,
'label' =>
"DateCreation"),
92 't.status' => array(
'checked' => 1,
'position' => 92,
'label' =>
"Status"),
95if (isModEnabled(
"bank")) {
96 $arrayfields[
't.fk_account'] = array(
'checked' => 1,
'position' => 60,
'label' =>
"DefaultBankAccount");
100'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';
103$hookmanager->initHooks(array(
'salestaxeslist'));
106$permissiontoadd = $user->hasRight(
'tax',
'charges',
'creer');
107$permissiontodelete = $user->hasRight(
'tax',
'charges',
'supprimer');
112 $socid = $user->socid;
121$parameters = array(
'socid' => $socid);
122$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
128if (empty($reshook)) {
130 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
132 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
135 $search_dateend_start =
'';
136 $search_dateend_end =
'';
137 $search_datepayment_start =
'';
138 $search_datepayment_end =
'';
140 $search_account =
'';
144 $search_array_options = array();
148 $objectclass =
'Tva';
149 $objectlabel =
'Tva';
150 $uploaddir = $conf->tax->dir_output;
151 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
159$form =
new Form($db);
162$tva_static =
new Tva($db);
169$title = $langs->trans(
"VATDeclarations");
176$sql =
'SELECT t.rowid, t.amount, t.label, t.datec, t.datev, t.paye as status, t.fk_typepayment as type, t.fk_account,';
177$sql .=
' ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,';
178$sql .=
' t.num_payment, pst.code as payment_code,';
179$sql .=
' SUM(ptva.amount) as alreadypayed';
183$sql .=
' FROM '.MAIN_DB_PREFIX.
'tva as t';
184$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'c_paiement as pst ON (t.fk_typepayment = pst.id)';
185$sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank_account as ba ON (t.fk_account = ba.rowid)';
186$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"payment_vat as ptva ON (ptva.fk_tva = t.rowid)";
187$sql .=
' WHERE t.entity IN ('.getEntity(
$object->element).
')';
189if (!empty($search_ref)) {
192if (!empty($search_label)) {
195if (!empty($search_dateend_start)) {
196 $sql .=
" AND t.datev >= '".$db->idate($search_dateend_start).
"'";
198if (!empty($search_dateend_end)) {
199 $sql .=
" AND t.datev <= '".$db->idate($search_dateend_end).
"'";
201if (!empty($search_datepayment_start)) {
202 $sql .=
" AND t.datep >= '".$db->idate($search_datepayment_start).
"'";
204if (!empty($search_datepayment_end)) {
205 $sql .=
" AND t.datep <= '".$db->idate($search_datepayment_end).
"'";
207if (!empty($search_type) && $search_type > 0) {
208 $sql .=
' AND t.fk_typepayment = '.((int) $search_type);
210if (!empty($search_account) && $search_account > 0) {
211 $sql .=
' AND t.fk_account = '.((int) $search_account);
213if (!empty($search_amount)) {
216if ($search_status !=
'' && $search_status >= 0) {
217 $sql .=
" AND t.paye = ".((int) $search_status);
220$sql .=
" GROUP BY t.rowid, t.amount, t.label, t.datec, t.datev, t.paye, t.fk_typepayment, t.fk_account,";
221$sql .=
" ba.label, ba.ref, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos, t.num_payment, pst.code";
224$nbtotalofrecords =
'';
227 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
228 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
229 $resql = $db->query($sqlforcount);
231 $objforcount = $db->fetch_object($resql);
232 $nbtotalofrecords = $objforcount->nbtotalofrecords;
237 if (($page * $limit) > $nbtotalofrecords) {
245$sql .= $db->order($sortfield, $sortorder);
247 $sql .= $db->plimit($limit + 1, $offset);
250$resql = $db->query($sql);
256$num = $db->num_rows($resql);
262llxHeader(
'', $title, $help_url, 0, 0,
'',
'',
'',
'bodyforlist');
264$arrayofselected = is_array($toselect) ? $toselect : array();
268 $param .=
'&mode='.urlencode($mode);
270if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
271 $param .=
'&contextpage='.urlencode($contextpage);
273if ($limit > 0 && $limit != $conf->liste_limit) {
274 $param .=
'&limit='.((int) $limit);
276if ($optioncss !=
'') {
277 $param .=
'&optioncss='.urlencode($optioncss);
280if (!empty($search_ref)) {
281 $param .=
'&search_ref="'.$search_ref.
'"';
283if (!empty($search_label)) {
284 $param .=
'&search_label="'.$search_label.
'"';
286if (!empty($search_dateend_start)) {
287 $param .=
'&search_dateend_startyear='.GETPOSTINT(
'search_dateend_startyear');
289if (!empty($search_dateend_start)) {
290 $param .=
'&search_dateend_startmonth='.GETPOSTINT(
'search_dateend_startmonth');
292if (!empty($search_dateend_start)) {
293 $param .=
'&search_dateend_startday='.GETPOSTINT(
'search_dateend_startday');
295if (!empty($search_dateend_end)) {
296 $param .=
'&search_dateend_endyear='.GETPOSTINT(
'search_dateend_endyear');
298if (!empty($search_dateend_end)) {
299 $param .=
'&search_dateend_endmonth='.GETPOSTINT(
'search_dateend_endmonth');
301if (!empty($search_dateend_end)) {
302 $param .=
'&search_dateend_endday='.GETPOSTINT(
'search_dateend_endday');
304if (!empty($search_datepayment_start)) {
305 $param .=
'&search_datepayment_startyear='.GETPOSTINT(
'search_datepayment_startyear');
307if (!empty($search_datepayment_start)) {
308 $param .=
'&search_datepayment_startmonth='.GETPOSTINT(
'search_datepayment_startmonth');
310if (!empty($search_datepayment_start)) {
311 $param .=
'&search_datepayment_startday='.GETPOSTINT(
'search_datepayment_startday');
313if (!empty($search_datepayment_end)) {
314 $param .=
'&search_datepayment_endyear='.GETPOSTINT(
'search_datepayment_endyear');
316if (!empty($search_datepayment_end)) {
317 $param .=
'&search_datepayment_endmonth='.GETPOSTINT(
'search_datepayment_endmonth');
319if (!empty($search_datepayment_end)) {
320 $param .=
'&search_datepayment_endday='.GETPOSTINT(
'search_datepayment_endday');
322if (!empty($search_type) && $search_type > 0) {
323 $param .=
'&search_type='.$search_type;
325if (!empty($search_account) && $search_account > 0) {
326 $param .=
'&search_account='.$search_account;
328if (!empty($search_amount)) {
329 $param .=
'&search_amount="'.$search_amount.
'"';
331if ($search_status !=
'' && $search_status !=
'-1') {
332 $param .=
'&search_status='.urlencode($search_status);
336$arrayofmassactions = array(
340if (!empty($permissiontodelete)) {
341 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
343$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
347print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
348if ($optioncss !=
'') {
349 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
351print
'<input type="hidden" name="token" value="'.newToken().
'">';
352print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
353print
'<input type="hidden" name="action" value="list">';
354print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
355print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
356print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
357print
'<input type="hidden" name="page" value="'.$page.
'">';
358print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
359print
'<input type="hidden" name="page_y" value="">';
360print
'<input type="hidden" name="mode" value="'.$mode.
'">';
362$url = DOL_URL_ROOT.
'/compta/tva/card.php?action=create';
364 $url .=
'&socid='.$socid;
367$newcardbutton .=
dolGetButtonTitle($langs->trans(
'ViewList'),
'',
'fa fa-bars imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=common'.preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', ((empty($mode) || $mode ==
'common') ? 2 : 1), array(
'morecss' =>
'reposition'));
368$newcardbutton .=
dolGetButtonTitle($langs->trans(
'ViewKanban'),
'',
'fa fa-th-list imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=kanban'.preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', ($mode ==
'kanban' ? 2 : 1), array(
'morecss' =>
'reposition'));
370$newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewVATPayment'),
'',
'fa fa-plus-circle', $url,
'', $permissiontoadd);
372print_barre_liste($title, $page, $_SERVER[
'PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'title_accountancy', 0, $newcardbutton,
'', $limit, 0, 0, 1);
375$topicmail =
"SendVAT";
377$objecttmp =
new Tva($db);
378$trackid =
'vat'.$object->id;
379include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
381$varpage = empty($contextpage) ? $_SERVER[
'PHP_SELF'] : $contextpage;
382$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
383if ($massactionbutton) {
384 $selectedfields .= $form->showCheckAddButtons(
'checkforselect', 1);
389$parameters = array();
390$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
391if (empty($reshook)) {
392 $moreforfilter .= $hookmanager->resPrint;
394 $moreforfilter = $hookmanager->resPrint;
397if (!empty($moreforfilter)) {
398 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
399 print $moreforfilter;
400 $parameters = array();
401 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
402 print $hookmanager->resPrint;
406$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
407$htmlofselectarray = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
408$selectedfields = ($mode !=
'kanban' ? $htmlofselectarray :
'');
409$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
411print
'<div class="div-table-responsive">';
412print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
416print
'<tr class="liste_titre_filter">';
419 print
'<td class="liste_titre center maxwidthsearch">';
420 $searchpicto = $form->showFilterButtons(
'left');
427 print
'<td class="liste_titre">';
432if (!empty($arrayfields[
't.rowid'][
'checked'])) {
433 print
'<td class="liste_titre">';
434 print
'<input type="text" class="flat" size="4" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
439if (!empty($arrayfields[
't.label'][
'checked'])) {
440 print
'<td class="liste_titre">';
441 print
'<input type="text" class="flat" size="10" name="search_label" value="'.dol_escape_htmltag($search_label).
'">';
446if (!empty($arrayfields[
't.datev'][
'checked'])) {
447 print
'<td class="liste_titre center">';
448 print
'<div class="nowrapfordate">';
449 print $form->selectDate($search_dateend_start ? $search_dateend_start : -1,
'search_dateend_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"From"));
451 print
'<div class="nowrapfordate">';
452 print $form->selectDate($search_dateend_end ? $search_dateend_end : -1,
'search_dateend_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"to"));
470if (!empty($arrayfields[
't.fk_typepayment'][
'checked'])) {
471 print
'<td class="liste_titre left">';
472 print $form->select_types_paiements($search_type,
'search_type',
'', 0, 1, 1, 16, 1,
'', 1);
477if (!empty($arrayfields[
't.fk_account'][
'checked'])) {
478 print
'<td class="liste_titre left">';
479 $form->select_comptes($search_account,
'search_account', 0,
'', 1);
484if (!empty($arrayfields[
't.amount'][
'checked'])) {
485 print
'<td class="liste_titre right">';
486 print
'<input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.
'">';
491if (!empty($arrayfields[
't.datec'][
'checked'])) {
492 print
'<td class="liste_titre right">';
498if (!empty($arrayfields[
't.status'][
'checked'])) {
499 print
'<td class="liste_titre right parentonrightofpage">';
500 $liststatus = array(
'0' => $langs->trans(
"Unpaid"),
'1' => $langs->trans(
"Paid"));
502 print $form->selectarray(
'search_status', $liststatus, $search_status, 1, 0, 0,
'', 0, 0, 0,
'',
'search_status width100 onrightofpage');
507include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
510$parameters = array(
'arrayfields' => $arrayfields);
511$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object, $action);
512print $hookmanager->resPrint;
516 print
'<td class="liste_titre center maxwidthsearch">';
517 $searchpicto = $form->showFilterButtons();
523$totalarray = array();
524$totalarray[
'nbfield'] = 0;
528print
'<tr class="liste_titre">';
530 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
531 $totalarray[
'nbfield']++;
535 $totalarray[
'nbfield']++;
537if (!empty($arrayfields[
't.rowid'][
'checked'])) {
538 print_liste_field_titre($arrayfields[
't.rowid'][
'label'], $_SERVER[
'PHP_SELF'],
't.rowid',
'', $param,
'', $sortfield, $sortorder);
539 $totalarray[
'nbfield']++;
541if (!empty($arrayfields[
't.label'][
'checked'])) {
542 print_liste_field_titre($arrayfields[
't.label'][
'label'], $_SERVER[
'PHP_SELF'],
't.label',
'', $param,
'', $sortfield, $sortorder);
543 $totalarray[
'nbfield']++;
545if (!empty($arrayfields[
't.datev'][
'checked'])) {
546 print_liste_field_titre($arrayfields[
't.datev'][
'label'], $_SERVER[
'PHP_SELF'],
't.datev',
'', $param,
'', $sortfield, $sortorder,
'center ');
547 $totalarray[
'nbfield']++;
549if (!empty($arrayfields[
't.fk_typepayment'][
'checked'])) {
550 print_liste_field_titre($arrayfields[
't.fk_typepayment'][
'label'], $_SERVER[
'PHP_SELF'],
't.fk_typepayment',
'', $param,
'', $sortfield, $sortorder,
'left ');
551 $totalarray[
'nbfield']++;
553if (!empty($arrayfields[
't.fk_account'][
'checked'])) {
554 print_liste_field_titre($arrayfields[
't.fk_account'][
'label'], $_SERVER[
'PHP_SELF'],
't.fk_account',
'', $param,
'', $sortfield, $sortorder,
'left ');
555 $totalarray[
'nbfield']++;
557if (!empty($arrayfields[
't.amount'][
'checked'])) {
558 print_liste_field_titre($arrayfields[
't.amount'][
'label'], $_SERVER[
'PHP_SELF'],
't.amount',
'', $param,
'', $sortfield, $sortorder,
'right ');
559 $totalarray[
'nbfield']++;
561if (!empty($arrayfields[
't.datec'][
'checked'])) {
562 print_liste_field_titre($arrayfields[
't.datec'][
'label'], $_SERVER[
'PHP_SELF'],
't.datec',
'', $param,
'', $sortfield, $sortorder,
'center ');
563 $totalarray[
'nbfield']++;
565if (!empty($arrayfields[
't.status'][
'checked'])) {
566 print_liste_field_titre($arrayfields[
't.status'][
'label'], $_SERVER[
"PHP_SELF"],
"t.paye",
"", $param,
'class="right"', $sortfield, $sortorder);
567 $totalarray[
'nbfield']++;
570include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
572$parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder);
573$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object, $action);
574print $hookmanager->resPrint;
578 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
579 $totalarray[
'nbfield']++;
586$savnbfield = $totalarray[
'nbfield'];
587$totalarray = array();
588$totalarray[
'nbfield'] = 0;
589$imaxinloop = ($limit ? min($num, $limit) : $num);
590while ($i < $imaxinloop) {
591 $obj = $db->fetch_object($resql);
596 $tva_static->id = $obj->rowid;
597 $tva_static->ref = $obj->rowid;
598 $tva_static->label = $obj->label;
599 $tva_static->type_payment = $obj->payment_code;
600 $tva_static->datev = $obj->datev;
601 $tva_static->date_creation = $obj->datec;
602 $tva_static->amount = $obj->amount;
603 $tva_static->paye = $obj->status;
604 $tva_static->status = $obj->status;
607 if ($mode ==
'kanban') {
609 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
610 print
'<div class="box-flex-container kanban">';
614 if ($massactionbutton || $massaction) {
616 if (in_array(
$object->id, $arrayofselected)) {
620 print
$object->getKanbanView(
'', array(
'selected' => $selected));
621 if ($i == ($imaxinloop - 1)) {
628 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
631 print
'<td class="nowrap center">';
632 if ($massactionbutton || $massaction) {
634 if (in_array(
$object->id, $arrayofselected)) {
637 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
641 $totalarray[
'nbfield']++;
647 print
'<td>'.(($offset * $limit) + $i).
'</td>';
649 $totalarray[
'nbfield']++;
654 if (!empty($arrayfields[
't.rowid'][
'checked'])) {
656 print $tva_static->getNomUrl(1);
659 $urlsource = $_SERVER[
'PHP_SELF'].
'?id='.$tva_static->id;
660 print $formfile->getDocumentsLink($tva_static->element, $filename, $filedir,
'',
'valignmiddle paddingleft2imp');
663 $totalarray[
'nbfield']++;
668 if (!empty($arrayfields[
't.label'][
'checked'])) {
669 print
'<td>'.dol_trunc($obj->label, 40).
'</td>';
671 $totalarray[
'nbfield']++;
676 if (!empty($arrayfields[
't.datev'][
'checked'])) {
677 print
'<td class="center">'.dol_print_date($db->jdate($obj->datev),
'day').
'</td>';
679 $totalarray[
'nbfield']++;
693 if (!empty($arrayfields[
't.fk_typepayment'][
'checked'])) {
695 if (!empty($obj->payment_code)) {
696 print $langs->trans(
"PaymentTypeShort".$obj->payment_code);
700 $totalarray[
'nbfield']++;
705 if (!empty($arrayfields[
't.fk_account'][
'checked'])) {
707 if ($obj->fk_account > 0) {
708 $bankstatic->id = $obj->fk_account;
709 $bankstatic->ref = $obj->bref;
710 $bankstatic->number = $obj->bnumber;
711 $bankstatic->iban = $obj->iban;
712 $bankstatic->bic = $obj->bic;
713 $bankstatic->currency_code = $langs->trans(
"Currency".$obj->currency_code);
714 $bankstatic->account_number = $obj->account_number;
715 $bankstatic->clos = $obj->clos;
720 $bankstatic->label = $obj->blabel;
721 print $bankstatic->getNomUrl(1);
725 $totalarray[
'nbfield']++;
730 if (!empty($arrayfields[
't.amount'][
'checked'])) {
731 print
'<td class="nowrap right"><span class="amount">' .
price($obj->amount) .
'</span></td>';
733 $totalarray[
'nbfield']++;
735 $totalarray[
'pos'][$totalarray[
'nbfield']] =
'amount';
736 if (empty($totalarray[
'val'][
'amount'])) {
737 $totalarray[
'val'][
'amount'] = $obj->amount;
739 $totalarray[
'val'][
'amount'] += $obj->amount;
743 if (!empty($arrayfields[
't.datec'][
'checked'])) {
744 print
'<td class="center">'.dol_print_date($db->jdate($obj->datec),
'day').
'</td>';
746 $totalarray[
'nbfield']++;
750 if (!empty($arrayfields[
't.status'][
'checked'])) {
751 print
'<td class="nowrap right">' . $tva_static->getLibStatut(5, $obj->alreadypayed) .
'</td>';
753 $totalarray[
'nbfield']++;
755 if (!empty($arrayfields[
't.amount'][
'checked'])) {
756 $totalarray[
'pos'][$totalarray[
'nbfield']] =
'';
762 print
'<td class="nowrap center">';
763 if ($massactionbutton || $massaction) {
765 if (in_array(
$object->id, $arrayofselected)) {
768 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
772 $totalarray[
'nbfield']++;
783include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
788 foreach ($arrayfields as $key => $val) {
789 if (!empty($val[
'checked'])) {
793 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
798$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
799$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
800print $hookmanager->resPrint;
802print
'</table>'.
"\n";
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage bank accounts.
Class to manage bank transaction lines.
Class to manage accounting journals.
Put here description of your class.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
dolGetButtonTitleSeparator($moreClass="")
Add space between dolGetButtonTitle.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.