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');
52 $year_current = strftime(
"%Y",
dol_now());
53 $year_start = $year_current;
55 $year_current = $year;
61 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) $date_end =
dol_time_plus_duree($date_start, 3,
'm') - 1;
69 elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end =
dol_time_plus_duree($date_start, 1, 'y') - 1;
70 elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end =
dol_time_plus_duree($date_start, 1, 'm') - 1;
81 if (empty($min)) $min = 0;
86 $calc = $conf->global->MAIN_INFO_LOCALTAX_CALC.$local;
87 $modetax = $conf->global->$calc;
89 if (empty($modetax)) $modetax = 0;
92 $socid =
GETPOST(
'socid',
'int');
93 if ($user->socid) $socid = $user->socid;
108 $form =
new Form($db);
109 $company_static =
new Societe($db);
110 $invoice_customer =
new Facture($db);
113 $product_static =
new Product($db);
114 $payment_static =
new Paiement($db);
118 $morequerystring =
'';
119 $listofparams = array(
'date_startmonth',
'date_startyear',
'date_startday',
'date_endmonth',
'date_endyear',
'date_endday');
120 foreach ($listofparams as $param)
122 if (
GETPOST($param) !=
'') $morequerystring .= ($morequerystring ?
'&' :
'').$param.
'='.
GETPOST($param);
125 llxHeader(
'', $langs->trans(
"LocalTaxReport"),
'',
'', 0, 0,
'',
'', $morequerystring);
127 $fsearch =
'<!-- hidden fields for form -->';
128 $fsearch .=
'<input type="hidden" name="token" value="'.newToken().
'">';
129 $fsearch .=
'<input type="hidden" name="modetax" value="'.$modetax.
'">';
130 $fsearch .=
'<input type="hidden" name="localTaxType" value="'.$local.
'">';
132 $name = $langs->transcountry($local == 1 ?
"LT1ReportByQuarters" :
"LT2ReportByQuarters", $mysoc->country_code);
134 if ($modetax == 0) $calcmode = $langs->trans(
'OptionVATDefault');
135 if ($modetax == 1) $calcmode = $langs->trans(
'OptionVATDebitOption');
136 if ($modetax == 2) $calcmode = $langs->trans(
'OptionPaymentForProductAndServices');
137 $calcmode .=
' <span class="opacitymedium">('.$langs->trans(
"TaxModuleSetupToModifyRules", DOL_URL_ROOT.
'/admin/taxes.php').
')</span>';
139 $period = $form->selectDate($date_start,
'date_start', 0, 0, 0,
'', 1, 0).
' - '.$form->selectDate($date_end,
'date_end', 0, 0, 0,
'', 1, 0);
140 $prevyear = $year_start;
142 if ($prevquarter > 1) {
148 $nextyear = $year_start;
150 if ($nextquarter < 4) {
156 $description .= $fsearch;
167 if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description .= $langs->trans(
"ThisIsAnEstimatedValue");
170 $elementcust = $langs->trans(
"CustomersInvoices");
171 $productcust = $langs->trans(
"ProductOrService");
172 $amountcust = $langs->trans(
"AmountHT");
173 $vatcust = $langs->trans(
"VATReceived");
174 $namecust = $langs->trans(
"Name");
175 if ($mysoc->tva_assuj) {
176 $vatcust .=
' ('.$langs->trans(
"StatusToPay").
')';
180 $elementsup = $langs->trans(
"SuppliersInvoices");
181 $productsup = $productcust;
182 $amountsup = $amountcust;
183 $vatsup = $langs->trans(
"VATPaid");
184 $namesup = $namecust;
185 if ($mysoc->tva_assuj) {
186 $vatsup .=
' ('.$langs->trans(
"ToGetBack").
')';
190 report_header($name,
'', $period, $periodlink, $description, $builddate, $exportlink, array(), $calcmode);
193 $vatcust = $langs->transcountry(
"LT1", $mysoc->country_code);
194 $vatsup = $langs->transcountry(
"LT1", $mysoc->country_code);
195 $vatexpensereport = $langs->transcountry(
"LT1", $mysoc->country_code);
197 $vatcust = $langs->transcountry(
"LT2", $mysoc->country_code);
198 $vatsup = $langs->transcountry(
"LT2", $mysoc->country_code);
199 $vatexpensereport = $langs->transcountry(
"LT2", $mysoc->country_code);
203 print '<div class="div-table-responsive">';
204 echo
'<table class="noborder centpercent">';
212 $x_coll =
tax_by_rate(
'localtax'.$local, $db, 0, 0, $date_start, $date_end, $modetax,
'sell');
213 $x_paye =
tax_by_rate(
'localtax'.$local, $db, 0, 0, $date_start, $date_end, $modetax,
'buy');
215 if (!is_array($x_coll) || !is_array($x_paye))
217 $langs->load(
"errors");
219 print '<tr><td colspan="'.$columns.
'">'.$langs->trans(
"ErrorNoAccountancyModuleLoaded").
'</td></tr>';
220 elseif ($x_coll == -2)
221 print '<tr><td colspan="'.$columns.'">'.$langs->trans("FeatureNotYetAvailable").'</td></tr>';
222 else print '<tr><td colspan="'.$columns.'">'.$langs->trans("Error").'</td></tr>';
227 foreach (array_keys($x_coll) as $my_coll_rate)
229 $x_both[$my_coll_rate][
'coll'][
'totalht'] = $x_coll[$my_coll_rate][
'totalht'];
230 $x_both[$my_coll_rate][
'coll'][
'localtax'.$local] = $x_coll[$my_coll_rate][
'localtax'.$local];
231 $x_both[$my_coll_rate][
'paye'][
'totalht'] = 0;
232 $x_both[$my_coll_rate][
'paye'][
'localtax'.$local] = 0;
233 $x_both[$my_coll_rate][
'coll'][
'links'] =
'';
234 $x_both[$my_coll_rate][
'coll'][
'detail'] = array();
235 foreach ($x_coll[$my_coll_rate][
'facid'] as $id=>$dummy)
237 $invoice_customer->id = $x_coll[$my_coll_rate][
'facid'][$id];
238 $invoice_customer->ref = $x_coll[$my_coll_rate][
'facnum'][$id];
239 $invoice_customer->type = $x_coll[$my_coll_rate][
'type'][$id];
240 $company_static->fetch($x_coll[$my_coll_rate][
'company_id'][$id]);
241 $x_both[$my_coll_rate][
'coll'][
'detail'][] = array(
242 'id' =>$x_coll[$my_coll_rate][
'facid'][$id],
243 'descr' =>$x_coll[$my_coll_rate][
'descr'][$id],
244 'pid' =>$x_coll[$my_coll_rate][
'pid'][$id],
245 'pref' =>$x_coll[$my_coll_rate][
'pref'][$id],
246 'ptype' =>$x_coll[$my_coll_rate][
'ptype'][$id],
247 'payment_id'=>$x_coll[$my_coll_rate][
'payment_id'][$id],
248 'payment_amount'=>$x_coll[$my_coll_rate][
'payment_amount'][$id],
249 'ftotal_ttc'=>$x_coll[$my_coll_rate][
'ftotal_ttc'][$id],
250 'dtotal_ttc'=>$x_coll[$my_coll_rate][
'dtotal_ttc'][$id],
251 'dtype' =>$x_coll[$my_coll_rate][
'dtype'][$id],
252 'datef' =>$x_coll[$my_coll_rate][
'datef'][$id],
253 'datep' =>$x_coll[$my_coll_rate][
'datep'][$id],
254 'company_link'=>$company_static->getNomUrl(1,
'', 20),
255 'ddate_start'=>$x_coll[$my_coll_rate][
'ddate_start'][$id],
256 'ddate_end' =>$x_coll[$my_coll_rate][
'ddate_end'][$id],
257 'totalht' =>$x_coll[$my_coll_rate][
'totalht_list'][$id],
258 'localtax1'=> $x_coll[$my_coll_rate][
'localtax1_list'][$id],
259 'localtax2'=> $x_coll[$my_coll_rate][
'localtax2_list'][$id],
260 'vat' =>$x_coll[$my_coll_rate][
'vat_list'][$id],
261 'link' =>$invoice_customer->getNomUrl(1,
'', 12)
266 foreach (array_keys($x_paye) as $my_paye_rate) {
267 $x_both[$my_paye_rate][
'paye'][
'totalht'] = $x_paye[$my_paye_rate][
'totalht'];
268 $x_both[$my_paye_rate][
'paye'][
'vat'] = $x_paye[$my_paye_rate][
'vat'];
269 if (!isset($x_both[$my_paye_rate][
'coll'][
'totalht'])) {
270 $x_both[$my_paye_rate][
'coll'][
'totalht'] = 0;
271 $x_both[$my_paye_rate][
'coll'][
'vat'] = 0;
273 $x_both[$my_paye_rate][
'paye'][
'links'] =
'';
274 $x_both[$my_paye_rate][
'paye'][
'detail'] = array();
276 foreach ($x_paye[$my_paye_rate][
'facid'] as $id=>$dummy)
278 $invoice_supplier->id = $x_paye[$my_paye_rate][
'facid'][$id];
279 $invoice_supplier->ref = $x_paye[$my_paye_rate][
'facnum'][$id];
280 $invoice_supplier->type = $x_paye[$my_paye_rate][
'type'][$id];
281 $x_both[$my_paye_rate][
'paye'][
'detail'][] = array(
282 'id' =>$x_paye[$my_paye_rate][
'facid'][$id],
283 'descr' =>$x_paye[$my_paye_rate][
'descr'][$id],
284 'pid' =>$x_paye[$my_paye_rate][
'pid'][$id],
285 'pref' =>$x_paye[$my_paye_rate][
'pref'][$id],
286 'ptype' =>$x_paye[$my_paye_rate][
'ptype'][$id],
287 'payment_id'=>$x_paye[$my_paye_rate][
'payment_id'][$id],
288 'payment_amount'=>$x_paye[$my_paye_rate][
'payment_amount'][$id],
289 'ftotal_ttc'=>
price2num($x_paye[$my_paye_rate][
'ftotal_ttc'][$id]),
290 'dtotal_ttc'=>
price2num($x_paye[$my_paye_rate][
'dtotal_ttc'][$id]),
291 'dtype' =>$x_paye[$my_paye_rate][
'dtype'][$id],
292 'datef' =>$x_paye[$my_paye_rate][
'datef'][$id],
293 'datep' =>$x_paye[$my_paye_rate][
'datep'][$id],
294 'company_link'=>$company_static->getNomUrl(1,
'', 20),
295 'ddate_start'=>$x_paye[$my_paye_rate][
'ddate_start'][$id],
296 'ddate_end' =>$x_paye[$my_paye_rate][
'ddate_end'][$id],
297 'totalht' =>
price2num($x_paye[$my_paye_rate][
'totalht_list'][$id]),
298 'localtax1'=> $x_paye[$my_paye_rate][
'localtax1_list'][$id],
299 'localtax2'=> $x_paye[$my_paye_rate][
'localtax2_list'][$id],
300 'vat' =>$x_paye[$my_paye_rate][
'vat_list'][$id],
301 'link' =>$invoice_supplier->getNomUrl(1,
'', 12)
314 $span = $columns - 1;
315 if ($modetax != 2) $span += 1;
316 if ($modetax != 1) $span += 1;
319 print '<tr class="liste_titre">';
320 print '<td class="left">'.$elementcust.
'</td>';
321 print '<td class="left">'.$productcust.
'</td>';
322 if ($modetax != 2)
print '<td class="right">'.$amountcust.
'</td>';
323 if ($modetax != 1)
print '<td class="right">'.$langs->trans(
"Payment").
' ('.$langs->trans(
"PercentOfInvoice").
')</td>';
324 print '<td class="right">'.$langs->trans(
"BI").
'</td>';
325 print '<td class="right">'.$vatcust.
'</td>';
331 foreach (array_keys($x_coll) as $rate)
333 $subtot_coll_total_ht = 0;
334 $subtot_coll_vat = 0;
336 if (is_array($x_both[$rate][
'coll'][
'detail']))
341 print '<td class="tax_rate">'.$langs->trans(
"Rate").
': '.
vatrate($rate).
'%</td><td colspan="'.$span.
'"></td>';
344 foreach ($x_both[$rate][
'coll'][
'detail'] as $index => $fields)
346 if (($local == 1 && $fields[
'localtax1'] != 0) || ($local == 2 && $fields[
'localtax2'] != 0))
349 $type = ($fields[
'dtype'] ? $fields[
'dtype'] : $fields[
'ptype']);
352 if (!empty($fields[
'ddate_start'])) $type = 1;
353 if (!empty($fields[
'ddate_end'])) $type = 1;
356 print '<tr class="oddeven">';
359 print '<td class="nowrap left">'.$fields[
'link'].
'</td>';
362 print '<td class="left">';
365 $product_static->id = $fields[
'pid'];
366 $product_static->ref = $fields[
'pref'];
367 $product_static->type = $fields[
'ptype'];
368 print $product_static->getNomUrl(1);
371 if ($type) $text =
img_object($langs->trans(
'Service'),
'service');
372 else $text =
img_object($langs->trans(
'Product'),
'product');
373 if (preg_match(
'/^\((.*)\)$/', $fields[
'descr'], $reg))
375 if ($reg[1] ==
'DEPOSIT') $fields[
'descr'] = $langs->transnoentitiesnoconv(
'Deposit');
376 elseif ($reg[1] ==
'CREDIT_NOTE') $fields['descr'] = $langs->transnoentitiesnoconv('CreditNote');
377 else $fields['descr'] = $langs->transnoentitiesnoconv($reg[1]);
389 print '<td class="nowrap right">';
393 $ratiolineinvoice = ($fields[
'dtotal_ttc'] / $fields[
'ftotal_ttc']);
399 $ratiopaymentinvoice = 1;
402 if (isset($fields[
'payment_amount']) && $fields[
'ftotal_ttc']) $ratiopaymentinvoice = ($fields[
'payment_amount'] / $fields[
'ftotal_ttc']);
403 print '<td class="nowrap right">';
404 if ($fields[
'payment_amount'] && $fields[
'ftotal_ttc'])
406 $payment_static->id = $fields[
'payment_id'];
407 print $payment_static->getNomUrl(2);
411 print $langs->trans(
"NotUsedForGoods");
414 if (isset($fields[
'payment_amount']))
print ' ('.round($ratiopaymentinvoice * 100, 2).
'%)';
420 print '<td class="nowrap right">';
421 $temp_ht = $fields[
'totalht'];
422 if ($type == 1) $temp_ht = $fields[
'totalht'] * $ratiopaymentinvoice;
427 print '<td class="nowrap right">';
428 $temp_vat = $local == 1 ? $fields[
'localtax1'] : $fields[
'localtax2'];
434 $subtot_coll_total_ht += $temp_ht;
435 $subtot_coll_vat += $temp_vat;
436 $x_coll_sum += $temp_vat;
442 print '<tr class="liste_total">';
444 print '<td class="right">'.$langs->trans(
"Total").
':</td>';
447 print '<td class="nowrap right"> </td>';
448 print '<td class="right"> </td>';
450 print '<td class="right">'.price(
price2num($subtot_coll_total_ht,
'MT')).
'</td>';
451 print '<td class="nowrap right">'.price(
price2num($subtot_coll_vat,
'MT')).
'</td>';
455 if (count($x_coll) == 0)
457 print '<tr class="liste_total">';
458 print '<td> </td>';
459 print '<td class="right">'.$langs->trans(
"Total").
':</td>';
462 print '<td class="nowrap right"> </td>';
463 print '<td class="right"> </td>';
466 print '<td class="nowrap right">'.price(
price2num(0,
'MT')).
'</td>';
471 print '<tr><td colspan="'.($span + 1).
'"> </td></tr>';
477 print '<tr class="liste_titre">';
478 print '<td class="left">'.$elementsup.
'</td>';
479 print '<td class="left">'.$productsup.
'</td>';
482 print '<td class="right">'.$amountsup.
'</td>';
483 print '<td class="right">'.$langs->trans(
"Payment").
' ('.$langs->trans(
"PercentOfInvoice").
')</td>';
485 print '<td class="right">'.$langs->trans(
"BI").
'</td>';
486 print '<td class="right">'.$vatsup.
'</td>';
489 foreach (array_keys($x_paye) as $rate)
491 $subtot_paye_total_ht = 0;
492 $subtot_paye_vat = 0;
494 if (is_array($x_both[$rate][
'paye'][
'detail']))
498 print '<td class="tax_rate">'.$langs->trans(
"Rate").
': '.
vatrate($rate).
'%</td><td colspan="'.$span.
'"></td>';
501 foreach ($x_both[$rate][
'paye'][
'detail'] as $index=>$fields)
503 if (($local == 1 && $fields[
'localtax1'] != 0) || ($local == 2 && $fields[
'localtax2'] != 0))
506 $type = ($fields[
'dtype'] ? $fields[
'dtype'] : $fields[
'ptype']);
509 if (!empty($fields[
'ddate_start'])) $type = 1;
510 if (!empty($fields[
'ddate_end'])) $type = 1;
513 print '<tr class="oddeven">';
516 print '<td class="nowrap left">'.$fields[
'link'].
'</td>';
519 print '<td class="left">';
522 $product_static->id = $fields[
'pid'];
523 $product_static->ref = $fields[
'pref'];
524 $product_static->type = $fields[
'ptype'];
525 print $product_static->getNomUrl(1);
528 if ($type) $text =
img_object($langs->trans(
'Service'),
'service');
529 else $text =
img_object($langs->trans(
'Product'),
'product');
540 print '<td class="nowrap right">';
545 $ratiolineinvoice = ($fields[
'dtotal_ttc'] / $fields[
'ftotal_ttc']);
552 $ratiopaymentinvoice = 1;
555 print '<td class="nowrap right">';
556 if (isset($fields[
'payment_amount']) && $fields[
'ftotal_ttc']) $ratiopaymentinvoice = ($fields[
'payment_amount'] / $fields[
'ftotal_ttc']);
557 if ($fields[
'payment_amount'] && $fields[
'ftotal_ttc'])
559 $paymentfourn_static->id = $fields[
'payment_id'];
560 print $paymentfourn_static->getNomUrl(2);
564 print $langs->trans(
"NA");
567 if (isset($fields[
'payment_amount'])) {
568 print ' ('.round($ratiopaymentinvoice * 100, 2).
'%)';
575 print '<td class="nowrap right">';
576 $temp_ht = $fields[
'totalht'] * $ratiopaymentinvoice;
581 print '<td class="nowrap right">';
582 $temp_vat = ($local == 1 ? $fields[
'localtax1'] : $fields[
'localtax2']) * $ratiopaymentinvoice;
588 $subtot_paye_total_ht += $temp_ht;
589 $subtot_paye_vat += $temp_vat;
590 $x_paye_sum += $temp_vat;
596 print '<tr class="liste_total">';
597 print '<td> </td>';
598 print '<td class="right">'.$langs->trans(
"Total").
':</td>';
601 print '<td class="nowrap right"> </td>';
602 print '<td class="right"> </td>';
604 print '<td class="right">'.price(
price2num($subtot_paye_total_ht,
'MT')).
'</td>';
605 print '<td class="nowrap right">'.price(
price2num($subtot_paye_vat,
'MT')).
'</td>';
609 if (count($x_paye) == 0) {
610 print '<tr class="liste_total">';
611 print '<td> </td>';
612 print '<td class="right">'.$langs->trans(
"Total").
':</td>';
614 print '<td class="nowrap right"> </td>';
615 print '<td class="right"> </td>';
618 print '<td class="nowrap right">'.price(
price2num(0,
'MT')).
'</td>';
623 $diff = $x_coll_sum - $x_paye_sum;
624 print '<tr class="liste_total">';
625 print '<td class="liste_total" colspan="'.$span.
'">'.$langs->trans(
"TotalToPay").($q ?
', '.$langs->trans(
"Quadri").
' '.$q :
'').
'</td>';
626 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.
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.
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.
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.
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.
if(!GETPOST('transkey', 'alphanohtml')&&!GETPOST('transphrase', 'alphanohtml')) else
View.
img_object($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
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.
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...
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
print
Draft customers invoices.
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.
dol_time_plus_duree($time, $duration_value, $duration_unit)
Add a delay to a date.
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.