Skip to content

Commit

Permalink
FIX Debug v21
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Nov 21, 2024
1 parent 6e9bbe4 commit 235b61e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions htdocs/compta/resultat/clientfourn.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@
print '<tr class="liste_titre">';

if ($modecompta == 'BOOKKEEPING') {
print_liste_field_titre("PredefinedGroups", $_SERVER["PHP_SELF"], 'f.thirdparty_code,f.rowid', '', $param, '', $sortfield, $sortorder, 'width200 ');
print_liste_field_titre("PredefinedGroups", $_SERVER["PHP_SELF"], 'f.thirdparty_code,f.rowid', '', $param, '', $sortfield, $sortorder, '');
} else {
print_liste_field_titre("", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'width200 ');
print_liste_field_titre("", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '');
}
print_liste_field_titre('');
if ($modecompta == 'BOOKKEEPING') {
Expand Down
8 changes: 4 additions & 4 deletions htdocs/compta/tva/quadri_detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
$invoice_type = GETPOSTISSET('invoice_type') ? GETPOST('invoice_type', 'alpha') : '';
$vat_rate_show = GETPOSTISSET('vat_rate_show') ? GETPOST('vat_rate_show', 'alphanohtml') : -1;

// Set $date_start_xxx and $date_end_xxx...
include DOL_DOCUMENT_ROOT . '/compta/tva/initdatesforvat.inc.php';
// Variables provided by include:
'
Expand Down Expand Up @@ -323,7 +324,7 @@

foreach ($x_paye[$my_paye_rate]['facid'] as $id => $dummy) {
// ExpenseReport
if ($x_paye[$my_paye_rate]['ptype'][$id] == 'ExpenseReportPayment') {
if ($x_paye[$my_paye_rate]['ptype'][$id] === 'ExpenseReportPayment') {
$expensereport->id = $x_paye[$my_paye_rate]['facid'][$id];
$expensereport->ref = $x_paye[$my_paye_rate]['facnum'][$id];
$expensereport->type = $x_paye[$my_paye_rate]['type'][$id];
Expand Down Expand Up @@ -441,7 +442,7 @@
print "<tr>";
print '<td class="tax_rate" colspan="' . ($span + 1) . '">';
print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%';
print ' - <a href="' . DOL_URL_ROOT . '/compta/tva/quadri_detail.php?invoice_type=customer';
print ' - <a class="reposition" href="' . DOL_URL_ROOT . '/compta/tva/quadri_detail.php?invoice_type=customer';
if ($invoice_type != 'customer' || !GETPOSTISSET('vat_rate_show') || GETPOST('vat_rate_show') != $rate) {
print '&amp;vat_rate_show=' . urlencode($rate);
}
Expand Down Expand Up @@ -681,7 +682,7 @@
print "<tr>";
print '<td class="tax_rate" colspan="' . ($span + 1) . '">';
print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%';
print ' - <a href="' . DOL_URL_ROOT . '/compta/tva/quadri_detail.php?invoice_type=supplier';
print ' - <a class="reposition" href="' . DOL_URL_ROOT . '/compta/tva/quadri_detail.php?invoice_type=supplier';
if ($invoice_type != 'supplier' || !GETPOSTISSET('vat_rate_show') || GETPOST('vat_rate_show') != $rate) {
print '&amp;vat_rate_show=' . urlencode($rate);
}
Expand Down Expand Up @@ -752,7 +753,6 @@
$type = 1;
}


print '<tr class="oddeven">';

// Ref
Expand Down
6 changes: 3 additions & 3 deletions htdocs/core/lib/tax.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1160,8 +1160,8 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
$sql = "SELECT d.rowid, d.product_type as dtype, e.rowid as facid, d.$f_rate as rate, d.vat_src_code as vat_src_code, d.total_ht as total_ht, d.total_ttc as total_ttc, d.total_tva as total_vat, e.note_private as descr,";
$sql .= " d.total_localtax1 as total_localtax1, d.total_localtax2 as total_localtax2, ";
$sql .= " e.date_debut as date_start, e.date_fin as date_end, e.fk_user_author,";
$sql .= " e.ref as facnum, e.total_ttc as ftotal_ttc, e.date_create, d.fk_c_type_fees as type,";
$sql .= " p.fk_bank as payment_id, p.amount as payment_amount, p.rowid as pid, e.ref as pref";
$sql .= " e.ref as facnum, e.ref as pref, e.total_ttc as ftotal_ttc, e.date_create, d.fk_c_type_fees as type,";
$sql .= " p.fk_bank as payment_id, p.amount as payment_amount, p.rowid as pid";
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport as e";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."expensereport_det as d ON d.fk_expensereport = e.rowid";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_expensereport as p ON p.fk_expensereport = e.rowid";
Expand All @@ -1184,7 +1184,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
$sql .= " AND (d.product_type = -1";
$sql .= " OR e.date_debut is NOT null OR e.date_fin IS NOT NULL)"; // enhance detection of service
if (getDolGlobalString('MAIN_NOT_INCLUDE_ZERO_VAT_IN_REPORTS')) {
$sql .= " AND (d.".$f_rate." <> 0 OR d.total_tva <> 0)";
$sql .= " AND (d.".$db->sanitize($f_rate)." <> 0 OR d.total_tva <> 0)";
}
$sql .= " ORDER BY e.rowid";

Expand Down

0 comments on commit 235b61e

Please sign in to comment.