Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
This commit is contained in:
commit
efe5cd3dd8
@ -1061,8 +1061,7 @@ class ActionComm extends CommonObject
|
||||
$this->nb=array();
|
||||
$sql = "SELECT count(a.id) as nb";
|
||||
}
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."actioncomm as a";
|
||||
$sql.= ")";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
|
||||
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
||||
$sql.= " WHERE 1 = 1";
|
||||
|
||||
@ -121,7 +121,7 @@ function pt($db, $sql, $date)
|
||||
if ($obj->mode == 'claimed' && ! empty($previousmode))
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap">'.$obj->dm."</td>\n";
|
||||
print '<td class="nowrap">'.$previousmonth."</td>\n";
|
||||
print '<td class="nowrap" align="right">'.price($amountclaimed)."</td>\n";
|
||||
print '<td class="nowrap" align="right">'.price($amountpaid)."</td>\n";
|
||||
print "</tr>\n";
|
||||
@ -271,7 +271,7 @@ $mend = $tmp['mon'];
|
||||
|
||||
$total=0; $subtotalcoll=0; $subtotalpaye=0; $subtotal=0;
|
||||
$i=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);
|
||||
if ($m == 13) $y++;
|
||||
@ -536,7 +536,7 @@ while ((($y < $yend) || ($y == $yend && $m < $mend)) && $mcursor < 1000) // $mcu
|
||||
if ($i > 2)
|
||||
{
|
||||
print '<tr class="liste_total">';
|
||||
print '<td align="right"><a href="quadri_detail.php?leftmenu=tax_vat&q='.($m/3).'&year='.$y.'">'.$langs->trans("SubTotal").'</a>:</td>';
|
||||
print '<td align="right"><a href="quadri_detail.php?leftmenu=tax_vat&q='.round($m/3).'&year='.$y.'">'.$langs->trans("SubTotal").'</a>:</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num($subtotalcoll,'MT')).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num($subtotalpaye,'MT')).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num($subtotal,'MT')).'</td>';
|
||||
|
||||
@ -505,7 +505,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
|
||||
if ($i > 2)
|
||||
{
|
||||
print '<tr class="liste_total">';
|
||||
print '<td align="right"><a href="quadri_detail.php?leftmenu=tax_vat&q='.($m/3).'&year='.$y.'">'.$langs->trans("SubTotal").'</a>:</td>';
|
||||
print '<td align="right"><a href="quadri_detail.php?leftmenu=tax_vat&q='.round($m/3).'&year='.$y.'">'.$langs->trans("SubTotal").'</a>:</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num($subtotalcoll,'MT')).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num($subtotalpaye,'MT')).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num($subtotal,'MT')).'</td>';
|
||||
|
||||
@ -89,8 +89,7 @@ class box_actions extends ModeleBoxes
|
||||
$sql.= ", s.nom as name";
|
||||
$sql.= ", s.rowid as socid";
|
||||
$sql.= ", s.code_client";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm AS ta, ";
|
||||
$sql.= MAIN_DB_PREFIX."actioncomm AS a)";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm AS ta, ".MAIN_DB_PREFIX."actioncomm AS a";
|
||||
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
||||
$sql.= " WHERE a.fk_action = ta.id";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user