FIX Debug report
This commit is contained in:
parent
6be499e921
commit
7665b9d505
@ -49,7 +49,7 @@ $date_startyear = GETPOST('date_startyear', 'int');
|
||||
$date_endmonth = GETPOST('date_endmonth', 'int');
|
||||
$date_endday = GETPOST('date_endday', 'int');
|
||||
$date_endyear = GETPOST('date_endyear', 'int');
|
||||
$showaccountdetail = GETPOST('showaccountdetail', 'aZ09') ?GETPOST('showaccountdetail', 'aZ09') : 'no';
|
||||
$showaccountdetail = GETPOST('showaccountdetail', 'aZ09') ? GETPOST('showaccountdetail', 'aZ09') : 'yes';
|
||||
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
@ -210,9 +210,9 @@ if ($modecompta == "CREANCES-DETTES") {
|
||||
$calcmode .= '<br>('.$langs->trans("SeeReportInDueDebtMode", '{s1}', '{s2}').')';
|
||||
$calcmode = str_replace(array('{s1}', '{s2}'), array('<a href="'.$_SERVER["PHP_SELF"].'?date_startyear='.$tmps['year'].'&date_startmonth='.$tmps['mon'].'&date_startday='.$tmps['mday'].'&date_endyear='.$tmpe['year'].'&date_endmonth='.$tmpe['mon'].'&date_endday='.$tmpe['mday'].'&modecompta=CREANCES-DETTES">', '</a>'), $calcmode);
|
||||
$period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0);
|
||||
$arraylist = array('no'=>$langs->trans("No"), 'yes'=>$langs->trans("AccountWithNonZeroValues"), 'all'=>$langs->trans("All"));
|
||||
$arraylist = array('no'=>$langs->trans("CustomerCode"), 'yes'=>$langs->trans("AccountWithNonZeroValues"), 'all'=>$langs->trans("All"));
|
||||
$period .= ' '.$langs->trans("DetailByAccount").' '.$form->selectarray('showaccountdetail', $arraylist, $showaccountdetail, 0);
|
||||
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year'] - 1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year'] + 1)."&modecompta=".$modecompta."'>".img_next()."</a>" : "");
|
||||
$periodlink = ($year_start ? "<a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year'] - 1)."&modecompta=".$modecompta."&showaccountdetail=".$showaccountdetail."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($tmps['year'] + 1)."&modecompta=".$modecompta."&showaccountdetail=".$showaccountdetail."'>".img_next()."</a>" : "");
|
||||
$description = $langs->trans("RulesResultBookkeepingPredefined");
|
||||
$description .= ' ('.$langs->trans("SeePageForSetup", DOL_URL_ROOT.'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin', $langs->transnoentitiesnoconv("Accountancy").' / '.$langs->transnoentitiesnoconv("Setup").' / '.$langs->transnoentitiesnoconv("Chartofaccounts")).')';
|
||||
$builddate = dol_now();
|
||||
@ -221,7 +221,7 @@ if ($modecompta == "CREANCES-DETTES") {
|
||||
|
||||
$hselected = 'report';
|
||||
|
||||
report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, array('modecompta'=>$modecompta), $calcmode);
|
||||
report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, array('modecompta'=>$modecompta, 'showaccountdetail'=>$showaccountdetail), $calcmode);
|
||||
|
||||
if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') {
|
||||
print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1);
|
||||
@ -300,7 +300,6 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
$oldpcgtype = '';
|
||||
$oldpcgsubtype = '';
|
||||
|
||||
dol_syslog("get bookkeeping entries", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
@ -313,19 +312,26 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
|
||||
if ($showaccountdetail == 'no') {
|
||||
if ($objp->pcg_type != $oldpcgtype) {
|
||||
print '<tr><td colspan="4">'.$objp->pcg_type.'</td></tr>';
|
||||
print '<tr><td colspan="3">'.$objp->pcg_type.'</td></tr>';
|
||||
$oldpcgtype = $objp->pcg_type;
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print '<td>'.$objp->pcg_type;
|
||||
print ($objp->name ? ' ('.$objp->name.')' : '');
|
||||
print "</td>\n";
|
||||
print '<td class="right"><span class="amount">'.price($objp->amount)."</span></td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
if ($showaccountdetail == 'no') {
|
||||
print '<td></td>';
|
||||
print '<td>';
|
||||
print $objp->pcg_type;
|
||||
print ($objp->name ? ' ('.$objp->name.')' : ' ('.$langs->trans("Unknown").')');
|
||||
print "</td>\n";
|
||||
} else {
|
||||
print '<td colspan="2">';
|
||||
print $objp->pcg_type;
|
||||
print "</td>\n";
|
||||
}
|
||||
print '<td class="right"><span class="amount">'.price($objp->amount)."</span></td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$total_ht += (isset($objp->amount) ? $objp->amount : 0);
|
||||
$total_ttc += (isset($objp->amount) ? $objp->amount : 0);
|
||||
|
||||
@ -371,7 +377,7 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print '<tr><td colspan="4" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
print '<tr><td colspan="3" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
@ -428,12 +434,15 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print "<td>".$langs->trans("Bills").' <a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$objp->socid.'">'.$objp->name."</td>\n";
|
||||
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td class="right"><span class="amount">'.price($objp->amount_ht)."</span></td>\n";
|
||||
print '<span class="amount">'.price($objp->amount_ht)."</span>";
|
||||
}
|
||||
print "</td>\n";
|
||||
print '<td class="right"><span class="amount">'.price($objp->amount_ttc)."</span></td>\n";
|
||||
|
||||
$total_ht += (isset($objp->amount_ht) ? $objp->amount_ht : 0);
|
||||
@ -473,12 +482,15 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print "<td>".$langs->trans("Bills")." ".$langs->trans("Other")." (".$langs->trans("PaymentsNotLinkedToInvoice").")\n";
|
||||
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td class="right"><span class="amount">'.price($objp->amount_ht)."</span></td>\n";
|
||||
print '<span class="amount">'.price($objp->amount_ht)."</span></td>\n";
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="right"><span class="amount">'.price($objp->amount_ttc)."</span></td>\n";
|
||||
|
||||
$total_ht += (isset($objp->amount_ht) ? $objp->amount_ht : 0);
|
||||
@ -495,7 +507,8 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
}
|
||||
|
||||
if ($total_ttc == 0) {
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print '<td colspan="3"><span class="opacitymedium">'.$langs->trans("None").'</span></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
@ -504,10 +517,14 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ttc_income += $total_ttc;
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td colspan="3" class="right">'.price($total_ht).'</td>';
|
||||
print price($total_ht);
|
||||
}
|
||||
print '<td colspan="3" class="right">'.price($total_ttc).'</td>';
|
||||
print '</td>';
|
||||
print '<td class="right">'.price($total_ttc).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
/*
|
||||
@ -564,13 +581,16 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$subtotal_ht += $obj->amount;
|
||||
$subtotal_ttc += $obj->amount;
|
||||
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
|
||||
print "<td>".$langs->trans("Donation")." <a href=\"".DOL_URL_ROOT."/don/list.php?search_company=".$obj->name."&search_name=".$obj->firstname." ".$obj->lastname."\">".$obj->name." ".$obj->firstname." ".$obj->lastname."</a></td>\n";
|
||||
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td class="right"><span class="amount">'.price($obj->amount).'</span></td>';
|
||||
print '<span class="amount">'.price($obj->amount).'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="right"><span class="amount">'.price($obj->amount).'</span></td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
@ -588,10 +608,14 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ttc_income += $subtotal_ttc;
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td colspan="3" class="right">'.price($subtotal_ht).'</td>';
|
||||
print price($subtotal_ht);
|
||||
}
|
||||
print '<td colspan="3" class="right">'.price($subtotal_ttc).'</td>';
|
||||
print '</td>';
|
||||
print '<td class="right">'.price($subtotal_ttc).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -646,12 +670,15 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print "<td>".$langs->trans("Bills").' <a href="'.DOL_URL_ROOT."/fourn/facture/list.php?socid=".$objp->socid.'">'.$objp->name.'</a></td>'."\n";
|
||||
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td class="right"><span class="amount">'.price(-$objp->amount_ht)."</span></td>\n";
|
||||
print '<span class="amount">'.price(-$objp->amount_ht)."</span>";
|
||||
}
|
||||
print "</td>\n";
|
||||
print '<td class="right"><span class="amount">'.price(-$objp->amount_ttc)."</span></td>\n";
|
||||
|
||||
$total_ht -= (isset($objp->amount_ht) ? $objp->amount_ht : 0);
|
||||
@ -663,7 +690,8 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print '<td colspan="3"><span class="opacitymedium">'.$langs->trans("None").'</span></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
@ -677,10 +705,14 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ttc_outcome += $subtotal_ttc;
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
||||
print price(-$subtotal_ht);
|
||||
}
|
||||
print '<td colspan="3" class="right">'.price(-$subtotal_ttc).'</td>';
|
||||
print '</td>';
|
||||
print '<td class="right">'.price(-$subtotal_ttc).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -742,17 +774,21 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$subtotal_ht += $obj->amount;
|
||||
$subtotal_ttc += $obj->amount;
|
||||
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print '<td>'.$obj->label.'</td>';
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td class="right"><span class="amount">'.price(-$obj->amount).'</span></td>';
|
||||
print '<span class="amount">'.price(-$obj->amount).'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="right"><span class="amount">'.price(-$obj->amount).'</span></td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print '<td colspan="3"><span class="opacitymedium">'.$langs->trans("None").'</span></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
@ -764,10 +800,14 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ttc_outcome += $subtotal_ttc;
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
||||
print price(-$subtotal_ht);
|
||||
}
|
||||
print '<td colspan="3" class="right">'.price(-$subtotal_ttc).'</td>';
|
||||
print '</td>';
|
||||
print '<td class="right">'.price(-$subtotal_ttc).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -829,17 +869,21 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$subtotal_ht += $obj->amount;
|
||||
$subtotal_ttc += $obj->amount;
|
||||
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print '<td>'.$obj->label.'</td>';
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td class="right"><span class="amount">'.price(-$obj->amount).'</span></td>';
|
||||
print '<span class="amount">'.price(-$obj->amount).'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="right"><span class="amount">'.price(-$obj->amount).'</span></td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print '<td colspan="3"><span class="opacitymedium">'.$langs->trans("None").'</span></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
@ -851,10 +895,14 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ttc_outcome += $subtotal_ttc;
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
||||
print price(-$subtotal_ht);
|
||||
}
|
||||
print '<td colspan="3" class="right">'.price(-$subtotal_ttc).'</td>';
|
||||
print '</td>';
|
||||
print '<td class="right">'.price(-$subtotal_ttc).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -930,16 +978,18 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$userstatic->fetch($obj->fk_user);
|
||||
|
||||
print "<td>".$langs->trans("Salary")." <a href=\"".DOL_URL_ROOT."/salaries/list.php?search_user=".urlencode($userstatic->getFullName($langs))."\">".$obj->firstname." ".$obj->lastname."</a></td>\n";
|
||||
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td class="right"><span class="amount">'.price(-$obj->amount).'</span></td>';
|
||||
print '<span class="amount">'.price(-$obj->amount).'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="right"><span class="amount">'.price(-$obj->amount).'</span></td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print '<td colspan="3"><span class="opacitymedium">'.$langs->trans("None").'</span></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
@ -951,10 +1001,14 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ttc_outcome += $subtotal_ttc;
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
||||
print price(-$subtotal_ht);
|
||||
}
|
||||
print '<td colspan="3" class="right">'.price(-$subtotal_ttc).'</td>';
|
||||
print '</td>';
|
||||
print '<td class="right">'.price(-$subtotal_ttc).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -1013,18 +1067,20 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$subtotal_ht += $obj->amount_ht;
|
||||
$subtotal_ttc += $obj->amount_ttc;
|
||||
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print "<td>".$langs->trans("ExpenseReport")." <a href=\"".DOL_URL_ROOT."/expensereport/list.php?search_user=".$obj->userid."\">".$obj->firstname." ".$obj->lastname."</a></td>\n";
|
||||
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td class="right"><span class="amount">'.price(-$obj->amount_ht).'</span></td>';
|
||||
print '<span class="amount">'.price(-$obj->amount_ht).'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="right"><span class="amount">'.price(-$obj->amount_ttc).'</span></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print '<td colspan="3"><span class="opacitymedium">'.$langs->trans("None").'</span></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
@ -1036,10 +1092,14 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ttc_outcome += $subtotal_ttc;
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td colspan="3" class="right">'.price(-$subtotal_ht).'</td>';
|
||||
print price(-$subtotal_ht);
|
||||
}
|
||||
print '<td colspan="3" class="right">'.price(-$subtotal_ttc).'</td>';
|
||||
print '</td>';
|
||||
print '<td class="right">'.price(-$subtotal_ttc).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -1076,11 +1136,14 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ht_outcome += $obj->amount;
|
||||
$total_ttc_outcome += $obj->amount;
|
||||
}
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print "<td>".$langs->trans("Debit")."</td>\n";
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td class="right"><span class="amount">'.price(-$obj->amount).'</span></td>';
|
||||
print '<span class="amount">'.price(-$obj->amount).'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="right"><span class="amount">'.price(-$obj->amount)."</span></td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
@ -1095,9 +1158,11 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
}
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print "<td>".$langs->trans("Credit")."</td>\n";
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td class="right"><span class="amount">'.price($obj->amount).'</span></td>';
|
||||
print '<span class="amount">'.price($obj->amount).'</span>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
@ -1105,10 +1170,14 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ht += $subtotal_ht;
|
||||
$total_ttc += $subtotal_ttc;
|
||||
print '<tr class="liste_total">';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td colspan="3" class="right">'.price($subtotal_ht).'</td>';
|
||||
print price($subtotal_ht);
|
||||
}
|
||||
print '<td colspan="3" class="right">'.price($subtotal_ttc).'</td>';
|
||||
print '</td>';
|
||||
print '<td class="right">'.price($subtotal_ttc).'</td>';
|
||||
print '</tr>';
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
@ -1160,10 +1229,14 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ttc_income += $subtotal_ttc;
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td colspan="3" class="right">'.price($subtotal_ht).'</td>';
|
||||
print price($subtotal_ht);
|
||||
}
|
||||
print '<td colspan="3" class="right">'.price($subtotal_ttc).'</td>';
|
||||
print '</td>';
|
||||
print '<td class="right">'.price($subtotal_ttc).'</td>';
|
||||
print '</tr>';
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
@ -1231,7 +1304,8 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ht_outcome -= 0;
|
||||
$total_ttc_outcome -= $amount;
|
||||
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print "<td>".$langs->trans("VATToPay")."</td>\n";
|
||||
print '<td class="right"> </td>'."\n";
|
||||
print '<td class="right"><span class="amount">'.price($amount)."</span></td>\n";
|
||||
@ -1289,7 +1363,8 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ht_income += 0;
|
||||
$total_ttc_income += $amount;
|
||||
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print '<td>'.$langs->trans("VATToCollect")."</td>\n";
|
||||
print '<td class="right"> </td>'."\n";
|
||||
print '<td class="right"><span class="amount">'.price($amount)."</span></td>\n";
|
||||
@ -1343,11 +1418,10 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ht_outcome -= 0;
|
||||
$total_ttc_outcome -= $amount;
|
||||
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print "<td>".$langs->trans("VATPaid")."</td>\n";
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td <class="right"></td>'."\n";
|
||||
}
|
||||
print '<td <class="right"></td>'."\n";
|
||||
print '<td class="right"><span class="amount">'.price($amount)."</span></td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
@ -1399,11 +1473,10 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
$total_ht_income += 0;
|
||||
$total_ttc_income += $amount;
|
||||
|
||||
print '<tr class="oddeven"><td> </td>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td> </td>';
|
||||
print "<td>".$langs->trans("VATCollected")."</td>\n";
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td class="right"></td>'."\n";
|
||||
}
|
||||
print '<td class="right"></td>'."\n";
|
||||
print '<td class="right"><span class="amount">'.price($amount)."</span></td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
@ -1411,10 +1484,10 @@ if ($modecompta == 'BOOKKEEPING') {
|
||||
|
||||
if ($mysoc->tva_assuj != '0') { // Assujetti
|
||||
print '<tr class="liste_total">';
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
print '<td colspan="3" class="right"> </td>';
|
||||
}
|
||||
print '<td colspan="3" class="right">'.price(price2num($subtotal_ttc, 'MT')).'</td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="right"> </td>';
|
||||
print '<td class="right">'.price(price2num($subtotal_ttc, 'MT')).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,11 +60,11 @@ $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear);
|
||||
|
||||
// We define date_start and date_end
|
||||
if (empty($date_start) || empty($date_end)) { // We define date_start and date_end
|
||||
$q = GETPOST("q") ?GETPOST("q") : 0;
|
||||
$q = GETPOST("q") ? GETPOST("q", 'int') : 0;
|
||||
if ($q == 0) {
|
||||
// We define date_start and date_end
|
||||
$year_end = $year_start + ($nbofyear - 1);
|
||||
$month_start = GETPOST("month") ?GETPOST("month") : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1);
|
||||
$month_start = GETPOST("month") ? GETPOST("month", 'int') : ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1);
|
||||
if (!GETPOST('month')) {
|
||||
if (!GETPOST("year") && $month_start > $month_current) {
|
||||
$year_start--;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user