30 require
'../../main.inc.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/lib/report.lib.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/tax.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
34 require_once DOL_DOCUMENT_ROOT.
'/compta/tva/class/tva.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/compta/localtax/class/localtax.class.php';
36 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
37 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
38 require_once DOL_DOCUMENT_ROOT.
'/compta/paiement/class/paiement.class.php';
39 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
40 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/paiementfourn.class.php';
41 require_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
42 require_once DOL_DOCUMENT_ROOT.
'/expensereport/class/paymentexpensereport.class.php';
45 $langs->loadLangs(array(
"other",
"compta",
"banks",
"bills",
"companies",
"product",
"trips",
"admin"));
47 $local =
GETPOST(
'localTaxType',
'int');
51 $year_current = strftime(
"%Y",
dol_now());
52 $year_start = $year_current;
54 $year_current = $year;
60 if (empty($date_start) || empty($date_end)) {
67 $date_start =
dol_get_first_day($year_start, empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START,
false);
68 if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) {
70 } elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) {
72 } elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) {
104 $calc = $conf->global->MAIN_INFO_LOCALTAX_CALC.$local;
105 $modetax = $conf->global->$calc;
107 $modetax =
GETPOST(
"modetax",
'int');
109 if (empty($modetax)) {
114 $socid =
GETPOST(
'socid',
'int');
116 $socid = $user->socid;
132 $company_static =
new Societe($db);
133 $invoice_customer =
new Facture($db);
136 $product_static =
new Product($db);
137 $payment_static =
new Paiement($db);
141 $morequerystring =
'';
142 $listofparams = array(
'date_startmonth',
'date_startyear',
'date_startday',
'date_endmonth',
'date_endyear',
'date_endday');
143 foreach ($listofparams as $param) {
145 $morequerystring .= ($morequerystring ?
'&' :
'').$param.
'='.
GETPOST($param);
149 llxHeader(
'', $langs->trans(
"LocalTaxReport"),
'',
'', 0, 0,
'',
'', $morequerystring);
151 $fsearch =
'<!-- hidden fields for form -->';
152 $fsearch .=
'<input type="hidden" name="token" value="'.newToken().
'">';
153 $fsearch .=
'<input type="hidden" name="modetax" value="'.$modetax.
'">';
154 $fsearch .=
'<input type="hidden" name="localTaxType" value="'.$local.
'">';
156 $name = $langs->transcountry($local == 1 ?
"LT1ReportByQuarters" :
"LT2ReportByQuarters", $mysoc->country_code);
159 $calcmode = $langs->trans(
'OptionVATDefault');
162 $calcmode = $langs->trans(
'OptionVATDebitOption');
165 $calcmode = $langs->trans(
'OptionPaymentForProductAndServices');
167 $calcmode .=
' <span class="opacitymedium">('.$langs->trans(
"TaxModuleSetupToModifyRules", DOL_URL_ROOT.
'/admin/taxes.php').
')</span>';
169 $period =
$form->selectDate($date_start,
'date_start', 0, 0, 0,
'', 1, 0).
' - '.
$form->selectDate($date_end,
'date_end', 0, 0, 0,
'', 1, 0);
170 $prevyear = $year_start;
172 if ($prevquarter > 1) {
178 $nextyear = $year_start;
180 if ($nextquarter < 4) {
186 $description .= $fsearch;
197 if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) {
198 $description .= $langs->trans(
"ThisIsAnEstimatedValue");
202 $elementcust = $langs->trans(
"CustomersInvoices");
203 $productcust = $langs->trans(
"ProductOrService");
204 $amountcust = $langs->trans(
"AmountHT");
205 $vatcust = $langs->trans(
"VATReceived");
206 $namecust = $langs->trans(
"Name");
207 if ($mysoc->tva_assuj) {
208 $vatcust .=
' ('.$langs->trans(
"StatusToPay").
')';
212 $elementsup = $langs->trans(
"SuppliersInvoices");
213 $productsup = $productcust;
214 $amountsup = $amountcust;
215 $vatsup = $langs->trans(
"VATPaid");
216 $namesup = $namecust;
217 if ($mysoc->tva_assuj) {
218 $vatsup .=
' ('.$langs->trans(
"ToGetBack").
')';
222 report_header($name,
'', $period, $periodlink, $description, $builddate, $exportlink, array(), $calcmode);
225 $vatcust = $langs->transcountry(
"LT1", $mysoc->country_code);
226 $vatsup = $langs->transcountry(
"LT1", $mysoc->country_code);
227 $vatexpensereport = $langs->transcountry(
"LT1", $mysoc->country_code);
229 $vatcust = $langs->transcountry(
"LT2", $mysoc->country_code);
230 $vatsup = $langs->transcountry(
"LT2", $mysoc->country_code);
231 $vatexpensereport = $langs->transcountry(
"LT2", $mysoc->country_code);
235 print
'<div class="div-table-responsive">';
236 echo
'<table class="noborder centpercent">';
244 $x_coll =
tax_by_rate(
'localtax'.$local, $db, 0, 0, $date_start, $date_end, $modetax,
'sell');
245 $x_paye =
tax_by_rate(
'localtax'.$local, $db, 0, 0, $date_start, $date_end, $modetax,
'buy');
247 if (!is_array($x_coll) || !is_array($x_paye)) {
248 $langs->load(
"errors");
250 print
'<tr><td colspan="'.$columns.
'">'.$langs->trans(
"ErrorNoAccountancyModuleLoaded").
'</td></tr>';
251 } elseif ($x_coll == -2) {
252 print
'<tr><td colspan="'.$columns.
'">'.$langs->trans(
"FeatureNotYetAvailable").
'</td></tr>';
254 print
'<tr><td colspan="'.$columns.
'">'.$langs->trans(
"Error").
'</td></tr>';
260 foreach (array_keys($x_coll) as $my_coll_rate) {
261 $x_both[$my_coll_rate][
'coll'][
'totalht'] = $x_coll[$my_coll_rate][
'totalht'];
262 $x_both[$my_coll_rate][
'coll'][
'localtax'.$local] = $x_coll[$my_coll_rate][
'localtax'.$local];
263 $x_both[$my_coll_rate][
'paye'][
'totalht'] = 0;
264 $x_both[$my_coll_rate][
'paye'][
'localtax'.$local] = 0;
265 $x_both[$my_coll_rate][
'coll'][
'links'] =
'';
266 $x_both[$my_coll_rate][
'coll'][
'detail'] = array();
267 foreach ($x_coll[$my_coll_rate][
'facid'] as $id => $dummy) {
268 $invoice_customer->id = $x_coll[$my_coll_rate][
'facid'][$id];
269 $invoice_customer->ref = $x_coll[$my_coll_rate][
'facnum'][$id];
270 $invoice_customer->type = $x_coll[$my_coll_rate][
'type'][$id];
271 $company_static->fetch($x_coll[$my_coll_rate][
'company_id'][$id]);
272 $x_both[$my_coll_rate][
'coll'][
'detail'][] = array(
273 'id' =>$x_coll[$my_coll_rate][
'facid'][$id],
274 'descr' =>$x_coll[$my_coll_rate][
'descr'][$id],
275 'pid' =>$x_coll[$my_coll_rate][
'pid'][$id],
276 'pref' =>$x_coll[$my_coll_rate][
'pref'][$id],
277 'ptype' =>$x_coll[$my_coll_rate][
'ptype'][$id],
278 'payment_id'=>$x_coll[$my_coll_rate][
'payment_id'][$id],
279 'payment_amount'=>$x_coll[$my_coll_rate][
'payment_amount'][$id],
280 'ftotal_ttc'=>$x_coll[$my_coll_rate][
'ftotal_ttc'][$id],
281 'dtotal_ttc'=>$x_coll[$my_coll_rate][
'dtotal_ttc'][$id],
282 'dtype' =>$x_coll[$my_coll_rate][
'dtype'][$id],
283 'datef' =>$x_coll[$my_coll_rate][
'datef'][$id],
284 'datep' =>$x_coll[$my_coll_rate][
'datep'][$id],
285 'company_link'=>$company_static->getNomUrl(1,
'', 20),
286 'ddate_start'=>$x_coll[$my_coll_rate][
'ddate_start'][$id],
287 'ddate_end' =>$x_coll[$my_coll_rate][
'ddate_end'][$id],
288 'totalht' =>$x_coll[$my_coll_rate][
'totalht_list'][$id],
289 'localtax1'=> $x_coll[$my_coll_rate][
'localtax1_list'][$id],
290 'localtax2'=> $x_coll[$my_coll_rate][
'localtax2_list'][$id],
291 'vat' =>$x_coll[$my_coll_rate][
'vat_list'][$id],
292 'link' =>$invoice_customer->getNomUrl(1,
'', 12)
297 foreach (array_keys($x_paye) as $my_paye_rate) {
298 $x_both[$my_paye_rate][
'paye'][
'totalht'] = $x_paye[$my_paye_rate][
'totalht'];
299 $x_both[$my_paye_rate][
'paye'][
'vat'] = $x_paye[$my_paye_rate][
'vat'];
300 if (!isset($x_both[$my_paye_rate][
'coll'][
'totalht'])) {
301 $x_both[$my_paye_rate][
'coll'][
'totalht'] = 0;
302 $x_both[$my_paye_rate][
'coll'][
'vat'] = 0;
304 $x_both[$my_paye_rate][
'paye'][
'links'] =
'';
305 $x_both[$my_paye_rate][
'paye'][
'detail'] = array();
307 foreach ($x_paye[$my_paye_rate][
'facid'] as $id => $dummy) {
308 $invoice_supplier->id = $x_paye[$my_paye_rate][
'facid'][$id];
309 $invoice_supplier->ref = $x_paye[$my_paye_rate][
'facnum'][$id];
310 $invoice_supplier->type = $x_paye[$my_paye_rate][
'type'][$id];
311 $x_both[$my_paye_rate][
'paye'][
'detail'][] = array(
312 'id' =>$x_paye[$my_paye_rate][
'facid'][$id],
313 'descr' =>$x_paye[$my_paye_rate][
'descr'][$id],
314 'pid' =>$x_paye[$my_paye_rate][
'pid'][$id],
315 'pref' =>$x_paye[$my_paye_rate][
'pref'][$id],
316 'ptype' =>$x_paye[$my_paye_rate][
'ptype'][$id],
317 'payment_id'=>$x_paye[$my_paye_rate][
'payment_id'][$id],
318 'payment_amount'=>$x_paye[$my_paye_rate][
'payment_amount'][$id],
319 'ftotal_ttc'=>
price2num($x_paye[$my_paye_rate][
'ftotal_ttc'][$id]),
320 'dtotal_ttc'=>
price2num($x_paye[$my_paye_rate][
'dtotal_ttc'][$id]),
321 'dtype' =>$x_paye[$my_paye_rate][
'dtype'][$id],
322 'datef' =>$x_paye[$my_paye_rate][
'datef'][$id],
323 'datep' =>$x_paye[$my_paye_rate][
'datep'][$id],
324 'company_link'=>$company_static->getNomUrl(1,
'', 20),
325 'ddate_start'=>$x_paye[$my_paye_rate][
'ddate_start'][$id],
326 'ddate_end' =>$x_paye[$my_paye_rate][
'ddate_end'][$id],
327 'totalht' =>
price2num($x_paye[$my_paye_rate][
'totalht_list'][$id]),
328 'localtax1'=> $x_paye[$my_paye_rate][
'localtax1_list'][$id],
329 'localtax2'=> $x_paye[$my_paye_rate][
'localtax2_list'][$id],
330 'vat' =>$x_paye[$my_paye_rate][
'vat_list'][$id],
331 'link' =>$invoice_supplier->getNomUrl(1,
'', 12)
344 $span = $columns - 1;
353 print
'<tr class="liste_titre">';
354 print
'<td class="left">'.$elementcust.
'</td>';
355 print
'<td class="left">'.$productcust.
'</td>';
357 print
'<td class="right">'.$amountcust.
'</td>';
360 print
'<td class="right">'.$langs->trans(
"Payment").
' ('.$langs->trans(
"PercentOfInvoice").
')</td>';
362 print
'<td class="right">'.$langs->trans(
"BI").
'</td>';
363 print
'<td class="right">'.$vatcust.
'</td>';
369 foreach (array_keys($x_coll) as $rate) {
370 $subtot_coll_total_ht = 0;
371 $subtot_coll_vat = 0;
373 if (is_array($x_both[$rate][
'coll'][
'detail'])) {
377 print
'<td class="tax_rate">'.$langs->trans(
"Rate").
': '.
vatrate($rate).
'%</td><td colspan="'.$span.
'"></td>';
380 foreach ($x_both[$rate][
'coll'][
'detail'] as $index => $fields) {
381 if (($local == 1 && $fields[
'localtax1'] != 0) || ($local == 2 && $fields[
'localtax2'] != 0)) {
383 $type = ($fields[
'dtype'] ? $fields[
'dtype'] : $fields[
'ptype']);
386 if (!empty($fields[
'ddate_start'])) {
389 if (!empty($fields[
'ddate_end'])) {
394 print
'<tr class="oddeven">';
397 print
'<td class="nowrap left">'.$fields[
'link'].
'</td>';
400 print
'<td class="left">';
401 if ($fields[
'pid']) {
402 $product_static->id = $fields[
'pid'];
403 $product_static->ref = $fields[
'pref'];
404 $product_static->type = $fields[
'ptype'];
405 print $product_static->getNomUrl(1);
411 $text =
img_object($langs->trans(
'Service'),
'service');
413 $text =
img_object($langs->trans(
'Product'),
'product');
415 if (preg_match(
'/^\((.*)\)$/', $fields[
'descr'], $reg)) {
416 if ($reg[1] ==
'DEPOSIT') {
417 $fields[
'descr'] = $langs->transnoentitiesnoconv(
'Deposit');
418 } elseif ($reg[1] ==
'CREDIT_NOTE') {
419 $fields[
'descr'] = $langs->transnoentitiesnoconv(
'CreditNote');
421 $fields[
'descr'] = $langs->transnoentitiesnoconv($reg[1]);
433 print
'<td class="nowrap right">';
434 print
price($fields[
'totalht']);
436 $ratiolineinvoice = ($fields[
'dtotal_ttc'] / $fields[
'ftotal_ttc']);
442 $ratiopaymentinvoice = 1;
444 if (isset($fields[
'payment_amount']) && $fields[
'ftotal_ttc']) {
445 $ratiopaymentinvoice = ($fields[
'payment_amount'] / $fields[
'ftotal_ttc']);
447 print
'<td class="nowrap right">';
448 if ($fields[
'payment_amount'] && $fields[
'ftotal_ttc']) {
449 $payment_static->id = $fields[
'payment_id'];
450 print $payment_static->getNomUrl(2);
453 print $langs->trans(
"NotUsedForGoods");
455 print
price($fields[
'payment_amount']);
456 if (isset($fields[
'payment_amount'])) {
457 print
' ('.round($ratiopaymentinvoice * 100, 2).
'%)';
464 print
'<td class="nowrap right">';
465 $temp_ht = $fields[
'totalht'];
467 $temp_ht = $fields[
'totalht'] * $ratiopaymentinvoice;
473 print
'<td class="nowrap right">';
474 $temp_vat = $local == 1 ? $fields[
'localtax1'] : $fields[
'localtax2'];
480 $subtot_coll_total_ht += $temp_ht;
481 $subtot_coll_vat += $temp_vat;
482 $x_coll_sum += $temp_vat;
488 print
'<tr class="liste_total">';
490 print
'<td class="right">'.$langs->trans(
"Total").
':</td>';
492 print
'<td class="nowrap right"> </td>';
493 print
'<td class="right"> </td>';
495 print
'<td class="right"><span class="amount">'.price(
price2num($subtot_coll_total_ht,
'MT')).
'</span></td>';
496 print
'<td class="nowrap right"><span class="amount">'.price(
price2num($subtot_coll_vat,
'MT')).
'</span></td>';
500 if (count($x_coll) == 0) {
501 print
'<tr class="liste_total">';
502 print
'<td> </td>';
503 print
'<td class="right">'.$langs->trans(
"Total").
':</td>';
505 print
'<td class="nowrap right"> </td>';
506 print
'<td class="right"> </td>';
508 print
'<td class="right"><span class="amount">'.price(
price2num(0,
'MT')).
'</span></td>';
509 print
'<td class="nowrap right"><span class="amount">'.price(
price2num(0,
'MT')).
'</span></td>';
514 print
'<tr><td colspan="'.($span + 1).
'"> </td></tr>';
520 print
'<tr class="liste_titre">';
521 print
'<td class="left">'.$elementsup.
'</td>';
522 print
'<td class="left">'.$productsup.
'</td>';
524 print
'<td class="right">'.$amountsup.
'</td>';
525 print
'<td class="right">'.$langs->trans(
"Payment").
' ('.$langs->trans(
"PercentOfInvoice").
')</td>';
527 print
'<td class="right">'.$langs->trans(
"BI").
'</td>';
528 print
'<td class="right">'.$vatsup.
'</td>';
531 foreach (array_keys($x_paye) as $rate) {
532 $subtot_paye_total_ht = 0;
533 $subtot_paye_vat = 0;
535 if (is_array($x_both[$rate][
'paye'][
'detail'])) {
538 print
'<td class="tax_rate">'.$langs->trans(
"Rate").
': '.
vatrate($rate).
'%</td><td colspan="'.$span.
'"></td>';
541 foreach ($x_both[$rate][
'paye'][
'detail'] as $index => $fields) {
542 if (($local == 1 && $fields[
'localtax1'] != 0) || ($local == 2 && $fields[
'localtax2'] != 0)) {
544 $type = ($fields[
'dtype'] ? $fields[
'dtype'] : $fields[
'ptype']);
547 if (!empty($fields[
'ddate_start'])) {
550 if (!empty($fields[
'ddate_end'])) {
555 print
'<tr class="oddeven">';
558 print
'<td class="nowrap left">'.$fields[
'link'].
'</td>';
561 print
'<td class="left">';
562 if ($fields[
'pid']) {
563 $product_static->id = $fields[
'pid'];
564 $product_static->ref = $fields[
'pref'];
565 $product_static->type = $fields[
'ptype'];
566 print $product_static->getNomUrl(1);
572 $text =
img_object($langs->trans(
'Service'),
'service');
574 $text =
img_object($langs->trans(
'Product'),
'product');
585 print
'<td class="nowrap right">';
586 print
price($fields[
'totalht']);
589 $ratiolineinvoice = ($fields[
'dtotal_ttc'] / $fields[
'ftotal_ttc']);
596 $ratiopaymentinvoice = 1;
598 print
'<td class="nowrap right">';
599 if (isset($fields[
'payment_amount']) && $fields[
'ftotal_ttc']) {
600 $ratiopaymentinvoice = ($fields[
'payment_amount'] / $fields[
'ftotal_ttc']);
602 if ($fields[
'payment_amount'] && $fields[
'ftotal_ttc']) {
603 $paymentfourn_static->id = $fields[
'payment_id'];
604 print $paymentfourn_static->getNomUrl(2);
607 print $langs->trans(
"NA");
610 if (isset($fields[
'payment_amount'])) {
611 print
' ('.round($ratiopaymentinvoice * 100, 2).
'%)';
618 print
'<td class="nowrap right">';
619 $temp_ht = $fields[
'totalht'] * $ratiopaymentinvoice;
624 print
'<td class="nowrap right">';
625 $temp_vat = ($local == 1 ? $fields[
'localtax1'] : $fields[
'localtax2']) * $ratiopaymentinvoice;
631 $subtot_paye_total_ht += $temp_ht;
632 $subtot_paye_vat += $temp_vat;
633 $x_paye_sum += $temp_vat;
639 print
'<tr class="liste_total">';
640 print
'<td> </td>';
641 print
'<td class="right">'.$langs->trans(
"Total").
':</td>';
643 print
'<td class="nowrap right"> </td>';
644 print
'<td class="right"> </td>';
646 print
'<td class="right"><span class="amount">'.price(
price2num($subtot_paye_total_ht,
'MT')).
'</span></td>';
647 print
'<td class="nowrap right"><span class="amount">'.price(
price2num($subtot_paye_vat,
'MT')).
'</span></td>';
651 if (count($x_paye) == 0) {
652 print
'<tr class="liste_total">';
653 print
'<td> </td>';
654 print
'<td class="right">'.$langs->trans(
"Total").
':</td>';
656 print
'<td class="nowrap right"> </td>';
657 print
'<td class="right"> </td>';
659 print
'<td class="right"><span class="amount">'.price(
price2num(0,
'MT')).
'</span></td>';
660 print
'<td class="nowrap right"><span class="amount">'.price(
price2num(0,
'MT')).
'</span></td>';
665 $diff = $x_coll_sum - $x_paye_sum;
666 print
'<tr class="liste_total">';
667 print
'<td class="liste_total" colspan="'.$span.
'">'.$langs->trans(
"TotalToPay").($q ?
', '.$langs->trans(
"Quadri").
' '.$q :
'').
'</td>';
668 print
'<td class="liste_total nowrap right"><b>'.price(
price2num($diff,
'MT')).
"</b></td>\n";
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto= 'UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
if($cancel &&!$id) if($action== 'add'&&!$cancel) if($action== 'delete') if($id) $form
Actions.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm= 'auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
Class to manage products or services.
dol_now($mode= 'auto')
Return date for now.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
report_header($reportname, $notused, $period, $periodlink, $description, $builddate, $exportlink= '', $moreparam=array(), $calcmode= '', $varlink= '')
Show header of a report.
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
Class to manage suppliers invoices.
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0)
Add a delay to a date.
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...
tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $direction, $m=0)
Gets Tax to collect for the given year (and given quarter or month) The function gets the Tax in spli...
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form...
Class to manage third parties objects (customers, suppliers, prospects...)
price2num($amount, $rounding= '', $option=0)
Function that return a number with universal decimal format (decimal separator is '...
Class to manage payments of customer invoices.
img_object($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Class to manage Trips and Expenses.
restrictedArea($user, $features, $objectid=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.
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Class to manage payments of expense report.
dol_trunc($string, $size=40, $trunc= 'right', $stringencoding= 'UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length. ...
print_date_range($date_start, $date_end, $format= '', $outputlangs= '')
Format output for start and end date.
Class to manage invoices.
Class to manage payments for supplier invoices.
vatrate($rate, $addpercent=false, $info_bits=0, $usestarfornpr=0, $html=0)
Return a string with VAT rate label formated for view output Used into pdf and HTML pages...