mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX Debug v21
This commit is contained in:
parent
6e9bbe42bb
commit
235b61e07a
|
|
@ -274,9 +274,9 @@ print '<table class="liste noborder centpercent">';
|
|||
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') {
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ $refresh = (GETPOSTISSET('submit') || GETPOSTISSET('vat_rate_show') || GETPOSTIS
|
|||
$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:
|
||||
'
|
||||
|
|
@ -323,7 +324,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
|||
|
||||
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];
|
||||
|
|
@ -441,7 +442,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
|||
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 '&vat_rate_show=' . urlencode($rate);
|
||||
}
|
||||
|
|
@ -681,7 +682,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
|||
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 '&vat_rate_show=' . urlencode($rate);
|
||||
}
|
||||
|
|
@ -752,7 +753,6 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
|||
$type = 1;
|
||||
}
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user