dolibarr  9.0.0
lines.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
3  * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
4  * Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
5  * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
6  * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
27 require '../../main.inc.php';
28 
29 require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
30 require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
31 require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.product.class.php';
32 require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
33 require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
34 require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
35 require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
36 require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
37 require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
38 
39 // Load translation files required by the page
40 $langs->loadLangs(array("compta","bills","other","accountancy","productbatch"));
41 
42 $account_parent = GETPOST('account_parent');
43 $changeaccount = GETPOST('changeaccount');
44 // Search Getpost
45 $search_lineid = GETPOST('search_lineid', 'int');
46 $search_ref = GETPOST('search_ref', 'alpha');
47 $search_invoice = GETPOST('search_invoice', 'alpha');
48 $search_label = GETPOST('search_label', 'alpha');
49 $search_desc = GETPOST('search_desc', 'alpha');
50 $search_amount = GETPOST('search_amount', 'alpha');
51 $search_account = GETPOST('search_account', 'alpha');
52 $search_vat = GETPOST('search_vat', 'alpha');
53 $search_day=GETPOST("search_day","int");
54 $search_month=GETPOST("search_month","int");
55 $search_year=GETPOST("search_year","int");
56 $search_country = GETPOST('search_country', 'alpha');
57 $search_tvaintra = GETPOST('search_tvaintra', 'alpha');
58 
59 // Load variable for pagination
60 $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
61 $sortfield = GETPOST('sortfield', 'alpha');
62 $sortorder = GETPOST('sortorder', 'alpha');
63 $page = GETPOST('page', 'int');
64 if (empty($page) || $page < 0) $page = 0;
65 $offset = $limit * $page;
66 $pageprev = $page - 1;
67 $pagenext = $page + 1;
68 if (! $sortfield)
69  $sortfield = "f.datef, f.ref, l.rowid";
70 if (! $sortorder) {
71  if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE > 0) {
72  $sortorder = "DESC";
73  }
74 }
75 
76 // Security check
77 if ($user->societe_id > 0)
79 if (! $user->rights->accounting->bind->write)
81 
82 $formaccounting = new FormAccounting($db);
83 
84 
85 /*
86  * Actions
87  */
88 
89 // Purge search criteria
90 if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
91 {
92  $search_lineid = '';
93  $search_ref = '';
94  $search_invoice = '';
95  $search_label = '';
96  $search_desc = '';
97  $search_amount = '';
98  $search_account = '';
99  $search_vat = '';
100  $search_day = '';
101  $search_month = '';
102  $search_year = '';
103  $search_country = '';
104  $search_tvaintra = '';
105 }
106 
107 if (is_array($changeaccount) && count($changeaccount) > 0) {
108  $error = 0;
109 
110  if (! (GETPOST('account_parent','int') >= 0))
111  {
112  $error++;
113  setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Account")), null, 'errors');
114  }
115 
116 
117  if (! $error)
118  {
119  $db->begin();
120 
121  $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as l";
122  $sql1 .= " SET l.fk_code_ventilation=" . (GETPOST('account_parent','int') > 0 ? GETPOST('account_parent','int') : '0');
123  $sql1 .= ' WHERE l.rowid IN (' . implode(',', $changeaccount) . ')';
124 
125  dol_syslog('accountancy/supplier/lines.php::changeaccount sql= ' . $sql1);
126  $resql1 = $db->query($sql1);
127  if (! $resql1) {
128  $error ++;
129  setEventMessages($db->lasterror(), null, 'errors');
130  }
131  if (! $error) {
132  $db->commit();
133  setEventMessages($langs->trans('Save'), null, 'mesgs');
134  } else {
135  $db->rollback();
136  setEventMessages($db->lasterror(), null, 'errors');
137  }
138 
139  $account_parent = ''; // Protection to avoid to mass apply it a second time
140  }
141 }
142 
143 
144 /*
145  * View
146  */
147 
148 $form = new Form($db);
149 $formother = new FormOther($db);
150 
151 llxHeader('', $langs->trans("SuppliersVentilation") . ' - ' . $langs->trans("Dispatched"));
152 
153 print '<script type="text/javascript">
154  $(function () {
155  $(\'#select-all\').click(function(event) {
156  // Iterate each checkbox
157  $(\':checkbox\').each(function() {
158  this.checked = true;
159  });
160  });
161  $(\'#unselect-all\').click(function(event) {
162  // Iterate each checkbox
163  $(\':checkbox\').each(function() {
164  this.checked = false;
165  });
166  });
167  });
168  </script>';
169 
170 /*
171  * Supplier Invoice lines
172  */
173 $sql = "SELECT f.rowid as facid, f.ref as ref, f.ref_supplier, f.libelle as invoice_label, f.datef, f.fk_soc,";
174 $sql.= " l.rowid, l.fk_product, l.product_type as line_type, l.description, l.total_ht , l.qty, l.tva_tx, l.vat_src_code,";
175 $sql.= " aa.label, aa.account_number, ";
176 $sql.= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.fk_product_type as type,";
177 $sql.= " co.code as country_code, co.label as country,";
178 $sql.= " s.tva_intra";
179 $parameters=array();
180 $reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
181 $sql.=$hookmanager->resPrint;
182 $sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as l";
183 $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
184 $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = l.fk_code_ventilation";
185 $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = l.fk_facture_fourn";
186 $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
187 $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays ";
188 $sql.= " WHERE f.rowid = l.fk_facture_fourn and f.fk_statut >= 1 AND l.fk_code_ventilation <> 0 ";
189 if ($search_lineid) {
190  $sql .= natural_search("l.rowid", $search_lineid, 1);
191 }
192 if (strlen(trim($search_invoice))) {
193  $sql .= natural_search("f.ref", $search_invoice);
194 }
195 if (strlen(trim($search_ref))) {
196  $sql .= natural_search("p.ref", $search_ref);
197 }
198 if (strlen(trim($search_label))) {
199  $sql .= natural_search("p.label", $search_label);
200 }
201 if (strlen(trim($search_desc))) {
202  $sql .= natural_search("l.description", $search_desc);
203 }
204 if (strlen(trim($search_amount))) {
205  $sql .= natural_search("l.total_ht", $search_amount, 1);
206 }
207 if (strlen(trim($search_account))) {
208  $sql .= natural_search("aa.account_number", $search_account);
209 }
210 if (strlen(trim($search_vat))) {
211  $sql .= natural_search("l.tva_tx", price2num($search_vat), 1);
212 }
213 if ($search_month > 0)
214 {
215  if ($search_year > 0 && empty($search_day))
216  $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
217  else if ($search_year > 0 && ! empty($search_day))
218  $sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
219  else
220  $sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
221 }
222 else if ($search_year > 0)
223 {
224  $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
225 }
226 if (strlen(trim($search_country))) {
227  $arrayofcode = getCountriesInEEC();
228  $country_code_in_EEC = $country_code_in_EEC_without_me = '';
229  foreach ($arrayofcode as $key => $value)
230  {
231  $country_code_in_EEC.=($country_code_in_EEC ? "," : "")."'".$value."'";
232  if ($value != $mysoc->country_code) $country_code_in_EEC_without_me.=($country_code_in_EEC_without_me ? "," : "")."'".$value."'";
233  }
234  if ($search_country == 'special_allnotme') $sql .= " AND co.code <> '".$db->escape($mysoc->country_code)."'";
235  elseif ($search_country == 'special_eec') $sql .= " AND co.code IN (".$country_code_in_EEC.")";
236  elseif ($search_country == 'special_eecnotme') $sql .= " AND co.code IN (".$country_code_in_EEC_without_me.")";
237  elseif ($search_country == 'special_noteec') $sql .= " AND co.code NOT IN (".$country_code_in_EEC.")";
238  else $sql .= natural_search(array("co.code","co.label"), $search_country);
239 }
240 if (strlen(trim($search_tvaintra))) {
241  $sql .= natural_search("s.tva_intra", $search_tvaintra);
242 }
243 $sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
244 
245 // Add where from hooks
246 $parameters=array();
247 $reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
248 $sql.=$hookmanager->resPrint;
249 
250 $sql .= $db->order($sortfield, $sortorder);
251 
252 // Count total nb of records
253 $nbtotalofrecords = '';
254 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
255 {
256  $result = $db->query($sql);
257  $nbtotalofrecords = $db->num_rows($result);
258  if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
259  {
260  $page = 0;
261  $offset = 0;
262  }
263 }
264 
265 $sql .= $db->plimit($limit + 1, $offset);
266 
267 dol_syslog('accountancy/supplier/lines.php');
268 $result = $db->query($sql);
269 
270 if ($result) {
271  $num_lines = $db->num_rows($result);
272  $i = 0;
273 
274  $param='';
275  if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
276  if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
277  if ($search_invoice) $param .= "&search_invoice=" . urlencode($search_invoice);
278  if ($search_ref) $param .= "&search_ref=" . urlencode($search_ref);
279  if ($search_label) $param .= "&search_label=" . urlencode($search_label);
280  if ($search_desc) $param .= "&search_desc=" . urlencode($search_desc);
281  if ($search_account) $param .= "&search_account=" . urlencode($search_account);
282  if ($search_vat) $param .= "&search_vat=" . urlencode($search_vat);
283  if ($search_day) $param .= '&search_day='.urlencode($search_day);
284  if ($search_month) $param .= '&search_month='.urlencode($search_month);
285  if ($search_year) $param .= '&search_year='.urlencode($search_year);
286  if ($search_country) $param .= "&search_country=" . urlencode($search_country);
287  if ($search_tvaintra) $param .= "&search_tvaintra=" . urlencode($search_tvaintra);
288 
289  print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
290  print '<input type="hidden" name="action" value="ventil">';
291  if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
292  print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
293  print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
294  print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
295  print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
296  print '<input type="hidden" name="page" value="'.$page.'">';
297 
298  print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
299 
300  print $langs->trans("DescVentilDoneSupplier") . '<br>';
301 
302  print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
303  print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
304  print '<input type="submit" class="button valignmiddle" value="' . $langs->trans("ChangeBinding") . '" /></div>';
305 
306  $moreforfilter = '';
307 
308  print '<div class="div-table-responsive">';
309  print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
310 
311  // We add search filter
312  print '<tr class="liste_titre_filter">';
313  print '<td class="liste_titre"><input type="text" class="flat maxwidth25" name="search_lineid" value="' . dol_escape_htmltag($search_lineid) . '""></td>';
314  print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
315  print '<td class="liste_titre"></td>';
316  print '<td class="liste_titre center nowraponall">';
317  if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
318  print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
319  $formother->select_year($search_year,'search_year',1, 20, 5);
320  print '</td>';
321  print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
322  //print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
323  print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
324  print '<td class="liste_titre" align="right"><input type="text" class="right flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
325  print '<td class="liste_titre" align="right"><input type="text" class="right flat maxwidth50" name="search_vat" placeholder="%" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
326  print '<td class="liste_titre">';
327  print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth200', 'code2', 1, 0, 1);
328  // print '<input type="text" class="flat maxwidth50" name="search_country" value="' . dol_escape_htmltag($search_country) . '">';
329  print '</td>';
330  print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="' . dol_escape_htmltag($search_tvaintra) . '"></td>';
331  print '<td class="liste_titre" align="center"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
332  print '<td class="liste_titre" align="center">';
333  $searchpicto=$form->showFilterButtons();
334  print $searchpicto;
335  print '</td>';
336  print "</tr>\n";
337 
338  print '<tr class="liste_titre">';
339  print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
340  print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
341  print_liste_field_titre("InvoiceLabel", $_SERVER["PHP_SELF"], "f.libelle", "", $param, '', $sortfield, $sortorder);
342  print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
343  print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
344  //print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
345  print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
346  print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
347  print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
348  print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
349  print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
350  print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
351  $checkpicto=$form->showCheckAddButtons();
352  print_liste_field_titre($checkpicto, '', '', '', '', 'align="center"');
353  print "</tr>\n";
354 
355  $facturefournisseur_static = new FactureFournisseur($db);
356  $product_static = new ProductFournisseur($db);
357 
358  while ($i < min($num_lines, $limit)) {
359  $objp = $db->fetch_object($result);
360 
361  $codecompta = length_accountg($objp->account_number) . ' - ' . $objp->label;
362 
363  $facturefournisseur_static->ref = $objp->ref;
364  $facturefournisseur_static->id = $objp->facid;
365 
366  $product_static->ref = $objp->product_ref;
367  $product_static->id = $objp->product_id;
368  $product_static->label = $objp->product_label;
369  $product_static->type = $objp->line_type;
370 
371  print '<tr class="oddeven">';
372 
373  // Line id
374  print '<td>' . $objp->rowid . '</td>';
375 
376  // Ref Invoice
377  print '<td class="nowraponall">' . $facturefournisseur_static->getNomUrl(1) . '</td>';
378 
379  print '<td class="tdoverflowonsmartphone">';
380  print $objp->invoice_label;
381  print '</td>';
382 
383  print '<td align="center">' . dol_print_date($db->jdate($objp->datef), 'day') . '</td>';
384 
385  // Ref product
386  print '<td>';
387  if ($product_static->id)
388  print $product_static->getNomUrl(1);
389  if ($objp->product_label) print '<br>'.$objp->product_label;
390  print '</td>';
391 
392  // Description
393  print '<td>';
394  $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description));
395  $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
396  print $form->textwithtooltip(dol_trunc($text,$trunclength), $objp->description);
397  print '</td>';
398 
399  print '<td align="right">' . price($objp->total_ht) . '</td>';
400 
401  print '<td align="right">' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '</td>';
402 
403  print '<td>' . $langs->trans("Country".$objp->country_code) .' ('.$objp->country_code.')</td>';
404 
405  print '<td>' . $objp->tva_intra . '</td>';
406 
407  print '<td align="center">';
408  print $codecompta . ' <a href="./card.php?id=' . $objp->rowid . '&backtopage='.urlencode($_SERVER["PHP_SELF"].($param?'?'.$param:'')) . '">';
409  print img_edit();
410  print '</a></td>';
411  print '<td class="center"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="' . $objp->rowid . '"/></td>';
412 
413  print '</tr>';
414  $i ++;
415  }
416  print '</table>';
417  print "</div>";
418 
419  if ($nbtotalofrecords > $limit) {
420  print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1);
421  }
422 
423  print '</form>';
424 } else {
425  print $db->lasterror();
426 }
427 
428 // End of page
429 llxFooter();
430 $db->close();
print $object label
hash of file content (md5_file(dol_osencode($destfull))
Definition: edit.php:153
llxFooter()
Empty footer.
Definition: wrapper.php:56
GETPOST($paramname, $check='none', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
print
Draft customers invoices.
Definition: index.php:91
setEventMessages($mesg, $mesgs, $style='mesgs')
Set event messages in dol_events session object.
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding &#39;...&#39; if string larger than length.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm=false, $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
img_edit($titlealt='default', $float=0, $other='class="pictoedit"')
Show logo editer/modifier fiche.
getCountriesInEEC()
Return list of countries that are inside the EEC (European Economic Community) TODO Add a field into ...
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
Definition: date.lib.php:453
Class to manage suppliers invoices.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...
if(! GETPOST('transkey', 'alphanohtml') &&! GETPOST('transphrase', 'alphanohtml')) else
View.
Definition: notice.php:43
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Class to manage generation of HTML components Only common components must be here.
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='title_generic.png', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0)
Print a title with navigation controls for pagination.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='')
Write log message into outputs.
getEntity($element, $shared=1, $currentobject=null)
Get list of entity id to use.
Classe permettant la generation de composants html autre Only common components are here...
llxHeader()
Empty header.
Definition: wrapper.php:44
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...
dolGetFirstLineOfText($text, $nboflines=1)
Return first line of text.
if(GETPOST('cancel', 'alpha')) if(! GETPOST( 'confirmmassaction', 'alpha') &&$massaction !='presend' &&$massaction !='confirm_presend')
Draft customers invoices.
Definition: list.php:156
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0)
Clean a string from all HTML tags and entities.
vatrate($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0)
Return a string with VAT rate label formated for view output Used into pdf and HTML pages...
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_print_date($time, $format='', $tzoutput='tzserver', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Definition: date.lib.php:467
Class to manage generation of HTML components for accounting management.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="")
Show title line of an array.
length_accountg($account)
Return General accounting account with defined length (used for product and miscellaneous) ...
price2num($amount, $rounding='', $alreadysqlnb=0)
Function that return a number with universal decimal format (decimal separator is &#39;...
Class to manage predefined suppliers products.