diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php
index 79182ca89bd..3588dced3f4 100644
--- a/htdocs/compta/charges/index.php
+++ b/htdocs/compta/charges/index.php
@@ -51,7 +51,7 @@ $result = restrictedArea($user, 'tax|salaries', '', '', 'charges|');
$mode = GETPOST("mode", 'alpha');
$year = GETPOST("year", 'int');
$filtre = GETPOST("filtre", 'alpha');
-if (!$year && $mode != 'sconly') { $year = date("Y", time()); }
+if (!$year) { $year = date("Y", time()); }
$search_account = GETPOST('search_account', 'int');
@@ -80,12 +80,10 @@ $accountstatic = new Account($db);
llxHeader('', $langs->trans("SpecialExpensesArea"));
$title = $langs->trans("SpecialExpensesArea");
-if ($mode == 'sconly') $title = $langs->trans("SocialContributionsPayments");
$param = '';
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit;
-if ($mode == 'sconly') $param = '&mode=sconly';
if ($sortfield) $param .= '&sortfield='.$sortfield;
if ($sortorder) $param .= '&sortorder='.$sortorder;
@@ -101,30 +99,18 @@ print ' ';
print ' ';
print ' ';
-$nav = '';
-if ($mode != 'sconly')
-{
- $nav = ($year ? ''.img_previous($langs->trans("Previous"), 'class="valignbottom"')." ".$langs->trans("Year").' '.$year.' '.img_next($langs->trans("Next"), 'class="valignbottom"')." " : "");
- print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $nav, '', $limit, 1);
-} else {
- print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $nav, '', $limit, 0);
-}
+$nav = ($year ? ''.img_previous($langs->trans("Previous"), 'class="valignbottom"')." ".$langs->trans("Year").' '.$year.' '.img_next($langs->trans("Next"), 'class="valignbottom"')." " : "");
+print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $nav, '', $limit, 1);
if ($year) $param .= '&year='.$year;
-if ($mode != 'sconly')
-{
- print ''.$langs->trans("DescTaxAndDividendsArea").' ';
- print " ";
-}
+print ''.$langs->trans("DescTaxAndDividendsArea").' ';
+print " ";
if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
{
// Social contributions only
- if ($mode != 'sconly')
- {
- print load_fiche_titre($langs->trans("SocialContributionsPayments").($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
- }
+ print load_fiche_titre($langs->trans("SocialContributionsPayments").($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
print '
';
print '';
@@ -249,113 +235,110 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
// VAT
if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
{
- if (!$mode || $mode != 'sconly')
+ print " ";
+
+ $tva = new Tva($db);
+
+ print load_fiche_titre($langs->trans("VATPayments").($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
+
+ $sql = "SELECT pv.rowid, pv.amount, pv.label, pv.datev as dm, pv.fk_bank,";
+ $sql .= " pct.code as payment_code,";
+ $sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel";
+ $sql .= " FROM ".MAIN_DB_PREFIX."tva as pv";
+ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON pv.fk_bank = b.rowid";
+ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
+ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pv.fk_typepayment = pct.id";
+ $sql .= " WHERE pv.entity IN (".getEntity("tax").")";
+ if ($year > 0)
{
- print " ";
+ // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance,
+ // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
+ $sql .= " AND pv.datev between '".$db->idate(dol_get_first_day($year, 1, false))."' AND '".$db->idate(dol_get_last_day($year, 12, false))."'";
+ }
+ if (preg_match('/^pv\./', $sortfield)) $sql .= $db->order($sortfield, $sortorder);
- $tva = new Tva($db);
-
- print load_fiche_titre($langs->trans("VATPayments").($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
-
- $sql = "SELECT pv.rowid, pv.amount, pv.label, pv.datev as dm, pv.fk_bank,";
- $sql .= " pct.code as payment_code,";
- $sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel";
- $sql .= " FROM ".MAIN_DB_PREFIX."tva as pv";
- $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON pv.fk_bank = b.rowid";
- $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
- $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pv.fk_typepayment = pct.id";
- $sql .= " WHERE pv.entity IN (".getEntity("tax").")";
- if ($year > 0)
+ $result = $db->query($sql);
+ if ($result)
+ {
+ $num = $db->num_rows($result);
+ $i = 0;
+ $total = 0;
+ print '';
+ print '';
+ print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="140px"', $sortfield, $sortorder);
+ print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
+ print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
+ print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
+ print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'align="center"', $sortfield, $sortorder);
+ print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
+ if (!empty($conf->banque->enabled)) print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
+ print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
+ print " \n";
+ $var = 1;
+ while ($i < $num)
{
- // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance,
- // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
- $sql .= " AND pv.datev between '".$db->idate(dol_get_first_day($year, 1, false))."' AND '".$db->idate(dol_get_last_day($year, 12, false))."'";
- }
- if (preg_match('/^pv\./', $sortfield)) $sql .= $db->order($sortfield, $sortorder);
+ $obj = $db->fetch_object($result);
- $result = $db->query($sql);
- if ($result)
- {
- $num = $db->num_rows($result);
- $i = 0;
- $total = 0;
- print '';
- print '';
- print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="140px"', $sortfield, $sortorder);
- print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
- print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
- print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
- print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'align="center"', $sortfield, $sortorder);
- print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
- if (!empty($conf->banque->enabled)) print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
- print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
- print " \n";
- $var = 1;
- while ($i < $num)
+ $total = $total + $obj->amount;
+
+
+ print '';
+ print ''.dol_print_date($db->jdate($obj->dm), 'day').' '."\n";
+
+ print "".$obj->label." \n";
+
+ print ''.price($obj->amount)." ";
+
+ // Ref payment
+ $tva_static->id = $obj->rowid;
+ $tva_static->ref = $obj->rowid;
+ print ''.$tva_static->getNomUrl(1)." \n";
+
+ // Date
+ print ''.dol_print_date($db->jdate($obj->dm), 'day')." \n";
+
+ // Type payment
+ print '';
+ if ($obj->payment_code) print $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
+ print $obj->num_payment.' ';
+
+ // Account
+ if (!empty($conf->banque->enabled))
{
- $obj = $db->fetch_object($result);
-
- $total = $total + $obj->amount;
-
-
- print ' ';
- print ''.dol_print_date($db->jdate($obj->dm), 'day').' '."\n";
-
- print "".$obj->label." \n";
-
- print ''.price($obj->amount)." ";
-
- // Ref payment
- $tva_static->id = $obj->rowid;
- $tva_static->ref = $obj->rowid;
- print ''.$tva_static->getNomUrl(1)." \n";
-
- // Date
- print ''.dol_print_date($db->jdate($obj->dm), 'day')." \n";
-
- // Type payment
print '';
- if ($obj->payment_code) print $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
- print $obj->num_payment.' ';
-
- // Account
- if (!empty($conf->banque->enabled))
+ if ($obj->fk_bank > 0)
{
- print '';
- if ($obj->fk_bank > 0)
- {
- //$accountstatic->fetch($obj->fk_bank);
- $accountstatic->id = $obj->bid;
- $accountstatic->ref = $obj->bref;
- $accountstatic->number = $obj->bnumber;
- $accountstatic->accountancy_number = $obj->account_number;
- $accountstatic->accountancy_journal = $obj->accountancy_journal;
- $accountstatic->label = $obj->blabel;
- print $accountstatic->getNomUrl(1);
- } else print ' ';
- print ' ';
- }
-
- // Paid
- print ''.price($obj->amount)." ";
- print " \n";
-
- $i++;
+ //$accountstatic->fetch($obj->fk_bank);
+ $accountstatic->id = $obj->bid;
+ $accountstatic->ref = $obj->bref;
+ $accountstatic->number = $obj->bnumber;
+ $accountstatic->accountancy_number = $obj->account_number;
+ $accountstatic->accountancy_journal = $obj->accountancy_journal;
+ $accountstatic->label = $obj->blabel;
+ print $accountstatic->getNomUrl(1);
+ } else print ' ';
+ print '';
}
- print ''.$langs->trans("Total").' ';
- print ''.price($total).' ';
- print ' ';
- print ' ';
- print ' ';
- print ' ';
- print ''.price($total)." ";
- print " ";
- print "
";
- $db->free($result);
- } else {
- dol_print_error($db);
+ // Paid
+ print ''.price($obj->amount)." ";
+ print "\n";
+
+ $i++;
}
+ print ''.$langs->trans("Total").' ';
+ print ''.price($total).' ';
+ print ' ';
+ print ' ';
+ print ' ';
+ print ' ';
+ print ''.price($total)." ";
+ print " ";
+
+ print "
";
+ $db->free($result);
+ } else {
+ dol_print_error($db);
}
}
@@ -379,73 +362,77 @@ if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1")
while ($j < $numlt)
{
- if (!$mode || $mode != 'sconly')
+ print " ";
+
+ $tva = new Tva($db);
+
+ print load_fiche_titre($langs->transcountry(($j == 1 ? "LT1Payments" : "LT2Payments"), $mysoc->country_code).($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
+
+
+ $sql = "SELECT pv.rowid, pv.amount, pv.label, pv.datev as dm, pv.datep as dp";
+ $sql .= " FROM ".MAIN_DB_PREFIX."localtax as pv";
+ $sql .= " WHERE pv.entity = ".$conf->entity." AND localtaxtype = ".$j;
+ if ($year > 0)
{
- print " ";
+ // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance,
+ // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
+ $sql .= " AND pv.datev between '".$db->idate(dol_get_first_day($year, 1, false))."' AND '".$db->idate(dol_get_last_day($year, 12, false))."'";
+ }
+ if (preg_match('/^pv/', $sortfield)) $sql .= $db->order($sortfield, $sortorder);
- $tva = new Tva($db);
+ $result = $db->query($sql);
+ if ($result)
+ {
+ $num = $db->num_rows($result);
+ $i = 0;
+ $total = 0;
+ print '';
+ print '';
+ print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder);
+ print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
+ print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
+ print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
+ print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datep", "", $param, 'align="center"', $sortfield, $sortorder);
+ print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
+ print " \n";
- print load_fiche_titre($langs->transcountry(($j == 1 ? "LT1Payments" : "LT2Payments"), $mysoc->country_code).($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
-
-
- $sql = "SELECT pv.rowid, pv.amount, pv.label, pv.datev as dm, pv.datep as dp";
- $sql .= " FROM ".MAIN_DB_PREFIX."localtax as pv";
- $sql .= " WHERE pv.entity = ".$conf->entity." AND localtaxtype = ".$j;
- if ($year > 0)
+ while ($i < $num)
{
- // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance,
- // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
- $sql .= " AND pv.datev between '".$db->idate(dol_get_first_day($year, 1, false))."' AND '".$db->idate(dol_get_last_day($year, 12, false))."'";
- }
- if (preg_match('/^pv/', $sortfield)) $sql .= $db->order($sortfield, $sortorder);
+ $obj = $db->fetch_object($result);
- $result = $db->query($sql);
- if ($result)
- {
- $num = $db->num_rows($result);
- $i = 0;
- $total = 0;
- print '';
- print '';
- print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder);
- print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
- print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
- print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datep", "", $param, 'align="center"', $sortfield, $sortorder);
- print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
+ $total = $total + $obj->amount;
+
+ print ' ';
+ print ''.dol_print_date($db->jdate($obj->dm), 'day').' '."\n";
+
+ print "".$obj->label." \n";
+
+ print ''.price($obj->amount)." ";
+
+ // Ref payment
+ $tva_static->id = $obj->rowid;
+ $tva_static->ref = $obj->rowid;
+ print ''.$tva_static->getNomUrl(1)." \n";
+
+ print ''.dol_print_date($db->jdate($obj->dp), 'day')." \n";
+ print ''.price($obj->amount)." ";
print " \n";
- while ($i < $num)
- {
- $obj = $db->fetch_object($result);
-
- $total = $total + $obj->amount;
-
- print '';
- print ''.dol_print_date($db->jdate($obj->dm), 'day').' '."\n";
-
- print "".$obj->label." \n";
-
- // Ref payment
- $tva_static->id = $obj->rowid;
- $tva_static->ref = $obj->rowid;
- print ''.$tva_static->getNomUrl(1)." \n";
-
- print ''.dol_print_date($db->jdate($obj->dp), 'day')." \n";
- print ''.price($obj->amount)." ";
- print " \n";
-
- $i++;
- }
- print ''.$langs->trans("Total").' ';
- print ''.price($total)." ";
- print " ";
-
- print "
";
- $db->free($result);
- } else {
- dol_print_error($db);
+ $i++;
}
+ print ''.$langs->trans("Total").' ';
+ print ''.price($total)." ";
+ print ' ';
+ print ' ';
+ print ''.price($total)." ";
+ print " ";
+
+ print "
";
+ $db->free($result);
+ } else {
+ dol_print_error($db);
}
+
$j++;
}
@@ -454,8 +441,6 @@ while ($j < $numlt)
/*
if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read))
{
- if (!$mode || $mode != 'sconly')
- {
$sal = new PaymentSalary($db);
print " ";
@@ -557,7 +542,6 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read))
} else {
dol_print_error($db);
}
- }
}
*/
diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php
index 5744f0ecd6c..11c8512a265 100644
--- a/htdocs/compta/payment_sc/card.php
+++ b/htdocs/compta/payment_sc/card.php
@@ -20,9 +20,9 @@
/**
* \file htdocs/compta/payment_sc/card.php
- * \ingroup facture
- * \brief Onglet payment of a social contribution
- * \remarks Fichier presque identique a fournisseur/paiement/card.php
+ * \ingroup tax
+ * \brief Tab with payment of a social contribution
+ * \remarks File similar to fourn/paiement/card.php
*/
require '../../main.inc.php';
@@ -38,7 +38,7 @@ $langs->loadLangs(array('bills', 'banks', 'companies'));
// Security check
$id = GETPOST("id", 'int');
$action = GETPOST('action', 'aZ09');
-$confirm = GETPOST('confirm');
+$confirm = GETPOST('confirm', 'aZ09');
if ($user->socid) $socid = $user->socid;
// TODO ajouter regle pour restreindre acces paiement
//$result = restrictedArea($user, 'facture', $id,'');
@@ -64,7 +64,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->tax->char
if ($result > 0)
{
$db->commit();
- header("Location: ".DOL_URL_ROOT."/compta/sociales/payments.php?mode=sconly");
+ header("Location: ".DOL_URL_ROOT."/compta/sociales/payments.php");
exit;
} else {
setEventMessages($object->error, $object->errors, 'errors');
diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php
index c1ad7d9b6cf..c8eea77e546 100644
--- a/htdocs/compta/sociales/payments.php
+++ b/htdocs/compta/sociales/payments.php
@@ -1,10 +1,11 @@
- * Copyright (C) 2004-2014 Laurent Destailleur
+ * Copyright (C) 2004-2016 Laurent Destailleur
* Copyright (C) 2005-2010 Regis Houssin
* Copyright (C) 2011-2016 Alexandre Spangaro
- * Copyright (C) 2011-2014 Juanjo Menent
+ * Copyright (C) 2011-2014 Juanjo Menent
* Copyright (C) 2015 Jean-François Ferry
+ * Copyright (C) 2019 Nicolas ZABOURI
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,7 +22,7 @@
*/
/**
- * \file htdocs/compta/sociales/payments.php
+ * \file htdocs/compta/charges/index.php
* \ingroup compta
* \brief Page to list payments of special expenses
*/
@@ -32,6 +33,13 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php';
require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
+
+
+$hookmanager = new HookManager($db);
+
+// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
+$hookmanager->initHooks(array('specialexpensesindex'));
// Load translation files required by the page
$langs->loadLangs(array('compta', 'bills'));
@@ -40,10 +48,10 @@ $langs->loadLangs(array('compta', 'bills'));
if ($user->socid) $socid = $user->socid;
$result = restrictedArea($user, 'tax|salaries', '', '', 'charges|');
-$mode = GETPOST("mode", 'alpha');
$year = GETPOST("year", 'int');
$filtre = GETPOST("filtre", 'alpha');
-if (!$year && $mode != 'sconly') { $year = date("Y", time()); }
+
+$search_account = GETPOST('search_account', 'int');
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
@@ -53,7 +61,7 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
-if (!$sortfield) $sortfield = "pc.datep";
+if (!$sortfield) $sortfield = "cs.date_ech";
if (!$sortorder) $sortorder = "DESC";
@@ -65,19 +73,20 @@ $tva_static = new Tva($db);
$socialcontrib = new ChargeSociales($db);
$payment_sc_static = new PaymentSocialContribution($db);
$sal_static = new PaymentSalary($db);
+$accountstatic = new Account($db);
llxHeader('', $langs->trans("SpecialExpensesArea"));
-$title = $langs->trans("SpecialExpensesArea");
-if ($mode == 'sconly') $title = $langs->trans("SocialContributionsPayments");
+$title = $langs->trans("SocialContributionsPayments");
$param = '';
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit;
-if ($mode == 'sconly') $param = '&mode=sconly';
if ($sortfield) $param .= '&sortfield='.$sortfield;
if ($sortorder) $param .= '&sortorder='.$sortorder;
+$totalnboflines = 0;
+$num = 0;
print '';
+$parameters = array('user' => $user);
+$reshook = $hookmanager->executeHooks('dashboardSpecialBills', $parameters, $object); // Note that $action and $object may have been modified by hook
+
// End of page
llxFooter();
$db->close();
diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql
index ea38a2e99a2..27eed001188 100644
--- a/htdocs/core/menus/init_menu_auguria.sql
+++ b/htdocs/core/menus/init_menu_auguria.sql
@@ -227,7 +227,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
-- Social contributions
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled', __HANDLER__, 'left', 2250__+MAX_llx_menu__, 'billing', 'tax_social', 2200__+MAX_llx_menu__, '/compta/sociales/list.php?mainmenu=billing&leftmenu=tax_social', 'SocialContributions', 1, '', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2251__+MAX_llx_menu__, 'billing', '', 2250__+MAX_llx_menu__, '/compta/sociales/card.php?mainmenu=billing&leftmenu=tax_social&action=create', 'MenuNewSocialContribution', 2, '', '$user->rights->tax->charges->creer', '', 0, 2, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2252__+MAX_llx_menu__, 'billing', '', 2250__+MAX_llx_menu__, '/compta/sociales/payments.php?mainmenu=billing&leftmenu=tax_social&mode=sconly', 'Payments', 2, '', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2252__+MAX_llx_menu__, 'billing', '', 2250__+MAX_llx_menu__, '/compta/sociales/payments.php?mainmenu=billing&leftmenu=tax_social', 'Payments', 2, '', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__);
-- VAT
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)', __HANDLER__, 'left', 2300__+MAX_llx_menu__, 'billing', 'tax_vat', 2200__+MAX_llx_menu__, '/compta/tva/list.php?mainmenu=billing&leftmenu=tax_vat', 'VAT', 1, 'companies', '$user->rights->tax->charges->lire', '', 0, 7, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2301__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/card.php?mainmenu=billing&leftmenu=tax_vat&action=create', 'New', 2, 'companies', '$user->rights->tax->charges->creer', '', 0, 0, __ENTITY__);
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 8da3a978b80..0221bed09f7 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -1096,7 +1096,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_social/i', $leftmenu)) {
$newmenu->add("/compta/sociales/card.php?leftmenu=tax_social&action=create", $langs->trans("MenuNewSocialContribution"), 2, $user->rights->tax->charges->creer);
$newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("List"), 2, $user->rights->tax->charges->lire);
- $newmenu->add("/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=billing&mode=sconly", $langs->trans("Payments"), 2, $user->rights->tax->charges->lire);
+ $newmenu->add("/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=billing", $langs->trans("Payments"), 2, $user->rights->tax->charges->lire);
}
// VAT
if (empty($conf->global->TAX_DISABLE_VAT_MENUS))