Fixing style errors.

This commit is contained in:
stickler-ci 2021-03-03 13:11:01 +00:00
parent 59a2fb8ed5
commit e1159f422a
2 changed files with 308 additions and 314 deletions

View File

@ -343,8 +343,7 @@ if ($refresh === true) {
$i = 0; $i = 0;
$mcursor = 0; $mcursor = 0;
while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mcursor is to avoid too large loop while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) { // $mcursor is to avoid too large loop
{
//$m = $conf->global->SOCIETE_FISCAL_MONTH_START + ($mcursor % 12); //$m = $conf->global->SOCIETE_FISCAL_MONTH_START + ($mcursor % 12);
if ($m == 13) $y++; if ($m == 13) $y++;
if ($m > 12) $m -= 12; if ($m > 12) $m -= 12;

View File

@ -71,7 +71,7 @@ if ($refresh === false) {
$date_start=dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); $date_start=dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"));
$date_end=dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); $date_end=dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"));
// Quarter // Quarter
if (empty($date_start) || empty($date_end)){ // We define date_start and date_end if (empty($date_start) || empty($date_end)) { // We define date_start and date_end
$q=GETPOST("q", "int"); $q=GETPOST("q", "int");
if (empty($q)) { if (empty($q)) {
if (GETPOST("month", "int")) { if (GETPOST("month", "int")) {
@ -448,11 +448,9 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
// Payment // Payment
$ratiopaymentinvoice=1; $ratiopaymentinvoice=1;
if ($modetax != 1) if ($modetax != 1) {
{
if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice')
|| ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) || ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) {
{
} else { } else {
if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) { if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) {
$ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']); $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']);
@ -604,8 +602,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
print '</tr>'; print '</tr>';
} }
if (count($x_coll) == 0) // Show a total line if nothing shown if (count($x_coll) == 0) { // Show a total line if nothing shown
{
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td colspan="4"></td>'; print '<td colspan="4"></td>';
print '<td class="right">'.$langs->trans("Total").':</td>'; print '<td class="right">'.$langs->trans("Total").':</td>';
@ -637,13 +634,11 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
print '<td class="right">'.$vatsup.'</td>'; print '<td class="right">'.$vatsup.'</td>';
print '</tr>'."\n"; print '</tr>'."\n";
foreach (array_keys($x_paye) as $rate) foreach (array_keys($x_paye) as $rate) {
{
$subtot_paye_total_ht = 0; $subtot_paye_total_ht = 0;
$subtot_paye_vat = 0; $subtot_paye_vat = 0;
if (is_array($x_both[$rate]['paye']['detail'])) if (is_array($x_both[$rate]['paye']['detail'])) {
{
print "<tr>"; print "<tr>";
print '<td class="tax_rate" colspan="' . ($span+1) . '">'; print '<td class="tax_rate" colspan="' . ($span+1) . '">';
print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%'; print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%';