dolibarr 21.0.0-beta
byratecountry.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
4 * Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
5 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
26// Load Dolibarr environment
27require '../../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
29require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
30require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
31require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
32require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php';
33require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
34require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
35require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
36require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
37require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
38require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
39require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php';
40
49// Load translation files required by the page
50$langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin", "accountancy"));
51
52$modecompta = (GETPOST('modecompta', 'alpha') ? GETPOST('modecompta', 'alpha') : $conf->global->ACCOUNTING_MODE);
53
54// Date range
55$year = GETPOSTINT("year");
56$month = GETPOSTINT("month");
57if (empty($year)) {
58 $year_current = dol_print_date(dol_now(), '%Y');
59 $month_current = dol_print_date(dol_now(), '%m');
60 $year_start = $year_current;
61} else {
62 $year_current = $year;
63 $month_current = dol_print_date(dol_now(), '%m');
64 $year_start = $year;
65}
66$date_start = dol_mktime(0, 0, 0, GETPOSTINT("date_startmonth"), GETPOSTINT("date_startday"), GETPOSTINT("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere
67$date_end = dol_mktime(23, 59, 59, GETPOSTINT("date_endmonth"), GETPOSTINT("date_endday"), GETPOSTINT("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere
68
69// Quarter
70$q = '';
71if (empty($date_start) || empty($date_end)) { // We define date_start and date_end
72 $q = GETPOSTINT("q");
73 if (empty($q)) {
74 // We define date_start and date_end
75 $month_start = GETPOST("month") ? GETPOST("month") : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1);
76 $year_end = $year_start;
77 $month_end = $month_start;
78 if (!GETPOST("month")) { // If month not forced
79 if (!GETPOST('year') && $month_start > $month_current) {
80 $year_start--;
81 $year_end--;
82 }
83 $month_end = $month_start - 1;
84 if ($month_end < 1) {
85 $month_end = 12;
86 } else {
87 $year_end++;
88 }
89 }
90 $date_start = dol_get_first_day($year_start, $month_start, false);
91 $date_end = dol_get_last_day($year_end, $month_end, false);
92 } else {
93 if ($q == 1) {
94 $date_start = dol_get_first_day($year_start, 1, false);
95 $date_end = dol_get_last_day($year_start, 3, false);
96 }
97 if ($q == 2) {
98 $date_start = dol_get_first_day($year_start, 4, false);
99 $date_end = dol_get_last_day($year_start, 6, false);
100 }
101 if ($q == 3) {
102 $date_start = dol_get_first_day($year_start, 7, false);
103 $date_end = dol_get_last_day($year_start, 9, false);
104 }
105 if ($q == 4) {
106 $date_start = dol_get_first_day($year_start, 10, false);
107 $date_end = dol_get_last_day($year_start, 12, false);
108 }
109 }
110}
111
112// $date_start and $date_end are defined. We force $year_start and $nbofyear
113$tmps = dol_getdate($date_start);
114$year_start = $tmps['year'];
115$tmpe = dol_getdate($date_end);
116$year_end = $tmpe['year'];
117
118$tmp_date_end = dol_time_plus_duree($date_start, 1, 'y') - 1;
119if ($tmp_date_end < $date_end || $date_end < $date_start) {
120 $date_end = $tmp_date_end;
121}
122
123$min = price2num(GETPOST("min", "alpha"));
124if (empty($min)) {
125 $min = 0;
126}
127
128// Define modetax (0 or 1)
129// 0=normal, 1=option vat for services is on debit, 2=option on payments for products
130$modetax = !getDolGlobalString('TAX_MODE') ? 0 : $conf->global->TAX_MODE;
131if (GETPOSTISSET("modetax")) {
132 $modetax = GETPOSTINT("modetax");
133}
134if (empty($modetax)) {
135 $modetax = 0;
136}
137
138// Security check
139$socid = GETPOSTINT('socid');
140if ($user->socid) {
141 $socid = $user->socid;
142}
143$result = restrictedArea($user, 'tax', '', '', 'charges');
144
145
146
147/*
148 * View
149 */
150
151$form = new Form($db);
152$company_static = new Societe($db);
153$invoice_customer = new Facture($db);
154$invoice_supplier = new FactureFournisseur($db);
155$expensereport = new ExpenseReport($db);
156$product_static = new Product($db);
157$payment_static = new Paiement($db);
158$paymentfourn_static = new PaiementFourn($db);
159$paymentexpensereport_static = new PaymentExpenseReport($db);
160
161$morequerystring = '';
162$listofparams = array('date_startmonth', 'date_startyear', 'date_startday', 'date_endmonth', 'date_endyear', 'date_endday');
163foreach ($listofparams as $param) {
164 if (GETPOST($param) != '') {
165 $morequerystring .= ($morequerystring ? '&' : '').$param.'='.GETPOST($param);
166 }
167}
168
169llxHeader('', $langs->trans("TurnoverReport"), '', '', 0, 0, '', '', $morequerystring);
170
171$exportlink = "";
172$namelink = "";
173//print load_fiche_titre($langs->trans("VAT"),"");
174
175//$fsearch.='<br>';
176$fsearch = '';
177$fsearch .= ' <input type="hidden" name="year" value="'.$year.'">';
178$fsearch .= ' <input type="hidden" name="modetax" value="'.$modetax.'">';
179//$fsearch.=' '.$langs->trans("SalesTurnoverMinimum").': ';
180//$fsearch.=' <input type="text" name="min" value="'.$min.'">';
181
182
183// Show report header
184$name = $langs->trans("xxx");
185$calcmode = '';
186if ($modetax == 0) {
187 $calcmode = $langs->trans('OptionVATDefault');
188}
189if ($modetax == 1) {
190 $calcmode = $langs->trans('OptionVATDebitOption');
191}
192if ($modetax == 2) {
193 $calcmode = $langs->trans('OptionPaymentForProductAndServices');
194}
195$calcmode .= '<br>('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')';
196// Set period
197$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver');
198$period .= ' - ';
199$period .= $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver');
200$prevyear = $year_start;
201$prevquarter = $q;
202if ($prevquarter > 1) {
203 $prevquarter--;
204} else {
205 $prevquarter = 4;
206 $prevyear--;
207}
208$nextyear = $year_start;
209$nextquarter = $q;
210if ($nextquarter < 4) {
211 $nextquarter++;
212} else {
213 $nextquarter = 1;
214 $nextyear++;
215}
216$description = $fsearch;
217$builddate = dol_now();
218
219if (isModEnabled('comptabilite')) {
220 $description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue");
221}
222if (getDolGlobalString('TAX_MODE_SELL_PRODUCT') == 'invoice') {
223 $description .= '<br>'.$langs->trans("RulesVATDueProducts");
224}
225if (getDolGlobalString('TAX_MODE_SELL_PRODUCT') == 'payment') {
226 $description .= '<br>'.$langs->trans("RulesVATInProducts");
227}
228if (getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'invoice') {
229 $description .= '<br>'.$langs->trans("RulesVATDueServices");
230}
231if (getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'payment') {
232 $description .= '<br>'.$langs->trans("RulesVATInServices");
233}
234if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) {
235 $description .= '<br>'.$langs->trans("DepositsAreNotIncluded");
236}
237if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) {
238 $description .= $langs->trans("SupplierDepositsAreNotIncluded");
239}
240// Customers invoices
241$elementcust = $langs->trans("CustomersInvoices");
242$productcust = $langs->trans("ProductOrService");
243$amountcust = $langs->trans("AmountHT");
244
245// Suppliers invoices
246$elementsup = $langs->trans("SuppliersInvoices");
247$productsup = $productcust;
248$amountsup = $amountcust;
249
250// TODO Report from bookkeeping not yet available, so we switch on report on business events
251if ($modecompta == "BOOKKEEPING") {
252 $modecompta = "CREANCES-DETTES";
253}
254if ($modecompta == "BOOKKEEPINGCOLLECTED") {
255 $modecompta = "RECETTES-DEPENSES";
256}
257
258// Show report header
259if ($modecompta == "CREANCES-DETTES") {
260 $name = $langs->trans("Turnover").', '.$langs->trans("ByVatRate");
261 $calcmode = $langs->trans("CalcModeDebt");
262 //$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
263
264 $description .= '<br>'.$langs->trans("RulesCADue");
265 if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) {
266 $description .= $langs->trans("DepositsAreNotIncluded");
267 } else {
268 $description .= $langs->trans("DepositsAreIncluded");
269 }
270 if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) {
271 $description .= $langs->trans("SupplierDepositsAreNotIncluded");
272 }
273
274 $builddate = dol_now();
275} elseif ($modecompta == "RECETTES-DEPENSES") {
276 $name = $langs->trans("TurnoverCollected").', '.$langs->trans("ByVatRate");
277 $calcmode = $langs->trans("CalcModePayment");
278 //$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modecompta=CREANCES-DETTES">','</a>').')';
279
280 $description .= $langs->trans("RulesCAIn");
281 $description .= $langs->trans("DepositsAreIncluded");
282
283 $builddate = dol_now();
284} //elseif ($modecompta == "BOOKKEEPING") {
285//} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") {
286//}
287$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0);
288$period .= ' - ';
289$period .= $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
290if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) {
291 $periodlink = '<a href="'.$_SERVER["PHP_SELF"].'?year='.($year_start - 1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year_start + 1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
292} else {
293 $periodlink = '';
294}
295
296$description .= ' <input type="hidden" name="modecompta" value="'.$modecompta.'">';
297
298report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, array(), $calcmode);
299
300if (isModEnabled('accounting') && $modecompta != 'BOOKKEEPING') {
301 print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, '1');
302}
303
304
305if ($modecompta == 'CREANCES-DETTES') {
306 print '<table class="noborder centpercent">';
307 print '<tr class="liste_titre"><td width="6%" class="right">'.$langs->trans("TurnoverbyVatrate").'</td>';
308 print '<td class="left">'.$langs->trans("ProductOrService").'</td>';
309 print '<td class="left">'.$langs->trans("Country").'</td>';
310 $i = 0;
311 while ($i < 12) {
312 $j = $i + (!getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START);
313 if ($j > 12) {
314 $j -= 12;
315 }
316 print '<td width="60" class="right">'.$langs->trans('MonthShort'.str_pad((string) $j, 2, '0', STR_PAD_LEFT)).'</td>';
317 $i++;
318 }
319 print '<td width="60" class="right"><b>'.$langs->trans("TotalHT").'</b></td></tr>';
320
321 // Sales invoices
322 $sql = "SELECT fd.tva_tx AS vatrate,";
323 $sql .= " fd.product_type AS product_type,";
324 $sql .= " cc.code, cc.label AS country,";
325 for ($i = 1; $i <= 12; $i++) {
326 $sql .= " SUM(".$db->ifsql("MONTH(f.datef)=".$i, "fd.total_ht", "0").") AS month".str_pad((string) $i, 2, "0", STR_PAD_LEFT).",";
327 }
328 $sql .= " SUM(fd.total_ht) as total";
329 $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd";
330 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture";
331 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as soc ON soc.rowid = f.fk_soc";
332 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as cc ON cc.rowid = soc.fk_pays";
333 $sql .= " WHERE f.datef >= '".$db->idate($date_start)."'";
334 $sql .= " AND f.datef <= '".$db->idate($date_end)."'";
335 $sql .= " AND f.fk_statut in (1,2)";
336 if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) {
337 $sql .= " AND f.type IN (0,1,2,5)";
338 } else {
339 $sql .= " AND f.type IN (0,1,2,3,5)";
340 }
341 $sql .= " AND f.entity IN (".getEntity('invoice', 0).")";
342 $sql .= " GROUP BY fd.tva_tx,fd.product_type, cc.label, cc.code ";
343 $sql .= " ORDER BY country, product_type, vatrate";
344
345 dol_syslog("htdocs/compta/tva/index.php", LOG_DEBUG);
346 $resql = $db->query($sql);
347 if ($resql) {
348 $num = $db->num_rows($resql);
349 $totalpermonth = array();
350 while ($obj = $db->fetch_object($resql)) {
351 print '<tr class="oddeven"><td class="right">'.vatrate($obj->vatrate).'</td>';
352 if ($obj->product_type == 0) {
353 print '<td class="left">'.$langs->trans("Product").'</td>';
354 } else {
355 print '<td class="left">'.$langs->trans("Service").'</td>';
356 }
357 // Country
358 print '<td>';
359 print $langs->trans("Country".$obj->code) != "Country".$obj->code ? $langs->trans("Country".$obj->code) : $obj->country;
360 print '</td>';
361 for ($i = 0; $i < 12; $i++) {
362 $j = $i + (!getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START);
363 if ($j > 12) {
364 $j -= 12;
365 }
366 $monthj = 'month'.str_pad((string) $j, 2, '0', STR_PAD_LEFT);
367 print '<td class="right" width="6%">'.price($obj->$monthj).'</td>';
368 $totalpermonth[$j] = (empty($totalpermonth[$j]) ? 0 : $totalpermonth[$j]) + $obj->$monthj;
369 }
370 print '<td class="right" width="6%"><b>'.price($obj->total).'</b></td>';
371 $totalpermonth['total'] = (empty($totalpermonth['total']) ? 0 : $totalpermonth['total']) + $obj->total;
372 print '</tr>';
373 }
374 $db->free($resql);
375
376 // Total
377 print '<tr class="liste_total"><td class="right"></td>';
378 print '<td class="left"></td>';
379 print '<td></td>';
380 for ($i = 0; $i < 12; $i++) {
381 $j = $i + (!getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START);
382 if ($j > 12) {
383 $j -= 12;
384 }
385 $monthj = 'month'.str_pad((string) $j, 2, '0', STR_PAD_LEFT);
386 print '<td class="right" width="6%">'.price((empty($totalpermonth[$j]) ? 0 : $totalpermonth[$j])).'</td>';
387 }
388 print '<td class="right" width="6%"><b>'.price((empty($totalpermonth['total']) ? 0 : $totalpermonth['total'])).'</b></td>';
389 print '</tr>';
390 } else {
391 print $db->lasterror(); // Show last sql error
392 }
393
394 print '<tr class="liste_titre"><td width="6%" class="right">'.$langs->trans("PurchasebyVatrate").'</td>';
395 print '<td class="left">'.$langs->trans("ProductOrService").'</td>';
396 print '<td class="left">'.$langs->trans("Country").'</td>';
397 $i = 0;
398 while ($i < 12) {
399 $j = $i + (!getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START);
400 if ($j > 12) {
401 $j -= 12;
402 }
403 print '<td width="60" class="right">'.$langs->trans('MonthShort'.str_pad((string) $j, 2, '0', STR_PAD_LEFT)).'</td>';
404 $i++;
405 }
406 print '<td width="60" class="right"><b>'.$langs->trans("TotalHT").'</b></td></tr>';
407
408 // Purchase invoices
409 $sql2 = "SELECT ffd.tva_tx AS vatrate,";
410 $sql2 .= " ffd.product_type AS product_type,";
411 $sql2 .= " cc.code, cc.label AS country,";
412 for ($i = 1; $i <= 12; $i++) {
413 $sql2 .= " SUM(".$db->ifsql("MONTH(ff.datef)=".$i, "ffd.total_ht", "0").") AS month".str_pad((string) $i, 2, "0", STR_PAD_LEFT).",";
414 }
415 $sql2 .= " SUM(ffd.total_ht) as total";
416 $sql2 .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as ffd";
417 $sql2 .= " INNER JOIN ".MAIN_DB_PREFIX."facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
418 $sql2 .= " INNER JOIN ".MAIN_DB_PREFIX."societe as soc ON soc.rowid = ff.fk_soc";
419 $sql2 .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as cc ON cc.rowid = soc.fk_pays";
420 $sql2 .= " WHERE ff.datef >= '".$db->idate($date_start)."'";
421 $sql2 .= " AND ff.datef <= '".$db->idate($date_end)."'";
422 $sql .= " AND ff.fk_statut in (1,2)";
423 if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) {
424 $sql .= " AND ff.type IN (0,1,2,5)";
425 } else {
426 $sql .= " AND ff.type IN (0,1,2,3,5)";
427 }
428 $sql2 .= " AND ff.entity IN (".getEntity("facture_fourn", 0).")";
429 $sql2 .= " GROUP BY ffd.tva_tx, ffd.product_type, cc.label, cc.code ";
430 $sql2 .= " ORDER BY country, product_type, vatrate";
431
432 //print $sql2;
433 dol_syslog("htdocs/compta/tva/index.php", LOG_DEBUG);
434 $resql2 = $db->query($sql2);
435 if ($resql2) {
436 $num = $db->num_rows($resql2);
437 $totalpermonth = array();
438 while ($obj = $db->fetch_object($resql2)) {
439 print '<tr class="oddeven"><td class="right">'.vatrate($obj->vatrate).'</td>';
440 if ($obj->product_type == 0) {
441 print '<td class="left">'.$langs->trans("Product").'</td>';
442 } else {
443 print '<td class="left">'.$langs->trans("Service").'</td>';
444 }
445 print '<td>';
446 print $langs->trans("Country".$obj->code) != "Country".$obj->code ? $langs->trans("Country".$obj->code) : $obj->country;
447 print '</td>';
448 for ($i = 0; $i < 12; $i++) {
449 $j = $i + (!getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START);
450 if ($j > 12) {
451 $j -= 12;
452 }
453 $monthj = 'month'.str_pad((string) $j, 2, '0', STR_PAD_LEFT);
454 print '<td class="right" width="6%">'.price($obj->$monthj).'</td>';
455 $totalpermonth[$j] = (empty($totalpermonth[$j]) ? 0 : $totalpermonth[$j]) + $obj->$monthj;
456 }
457 print '<td class="right" width="6%"><b>'.price($obj->total).'</b></td>';
458 $totalpermonth['total'] = (empty($totalpermonth['total']) ? 0 : $totalpermonth['total']) + $obj->total;
459 print '</tr>';
460 }
461 $db->free($resql2);
462
463 // Total
464 print '<tr class="liste_total"><td class="right"></td>';
465 print '<td class="left"></td>';
466 print '<td></td>';
467 for ($i = 0; $i < 12; $i++) {
468 $j = $i + (!getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START);
469 if ($j > 12) {
470 $j -= 12;
471 }
472 $monthj = 'month'.str_pad((string) $j, 2, '0', STR_PAD_LEFT);
473 print '<td class="right" width="6%">'.price(empty($totalpermonth[$j]) ? 0 : $totalpermonth[$j]).'</td>';
474 }
475 print '<td class="right" width="6%"><b>'.price(empty($totalpermonth['total']) ? 0 : $totalpermonth['total']).'</b></td>';
476 print '</tr>';
477 } else {
478 print $db->lasterror(); // Show last sql error
479 }
480 print "</table>\n";
481} else {
482 // $modecompta != 'CREANCES-DETTES'
483 // "Calculation of part of each product for accountancy in this mode is not possible. When a partial payment (for example 5 euros) is done on an
484 // invoice with 2 product (product A for 10 euros and product B for 20 euros), what is part of paiment for product A and part of paiment for product B ?
485 // Because there is no way to know this, this report is not relevant.
486 print '<br>'.$langs->trans("TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant").'<br>';
487}
488
489// End of page
490llxFooter();
491$db->close();
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:71
Class to manage Trips and Expenses.
Class to manage suppliers invoices.
Class to manage invoices.
Class to manage generation of HTML components Only common components must be here.
Class to manage payments for supplier invoices.
Class to manage payments of customer invoices.
Class to manage payments of expense report.
Class to manage products or services.
Class to manage third parties objects (customers, suppliers, prospects...)
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
Definition date.lib.php:600
dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforendofmonth=0)
Add a delay to a date.
Definition date.lib.php:125
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Definition date.lib.php:619
llxFooter()
Footer empty.
Definition document.php:107
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...
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 '.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
img_previous($titlealt='default', $moreatt='')
Show previous logo.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
img_next($titlealt='default', $moreatt='')
Show next logo.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_getdate($timestamp, $fast=false, $forcetimezone='')
Return an array with locale date info.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
report_header($reportname, $notused, $period, $periodlink, $description, $builddate, $exportlink='', $moreparam=array(), $calcmode='', $varlink='')
Show header of a report.
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.