Reports is more clear.
This commit is contained in:
parent
337405b5f8
commit
808e54edfc
@ -162,7 +162,7 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly')
|
||||
{
|
||||
// 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 f.datev between '".$db->idate(dol_get_first_day($year,1))."' AND '".$db->idate(dol_get_last_day($year,12))."'";
|
||||
$sql.= " AND f.datev between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
|
||||
}
|
||||
$sql.= " ORDER BY dm DESC";
|
||||
|
||||
|
||||
@ -109,6 +109,9 @@ $textnextyear=" <a href=\"index.php?year=" . ($year_current+1) . "\">".img_next(
|
||||
|
||||
print_fiche_titre($langs->trans("VAT"),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear");
|
||||
|
||||
print $langs->trans("VATReportBuildWithOptionDefinedInModule").'<br>';
|
||||
print '('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')<br>';
|
||||
print '<br>';
|
||||
|
||||
echo '<table width="100%" class="nobordernopadding">';
|
||||
echo '<tr><td>';
|
||||
@ -211,9 +214,8 @@ print '</table>';
|
||||
|
||||
echo '</td><td> </td><td valign="top" width="50%">';
|
||||
|
||||
|
||||
/*
|
||||
* Reglee
|
||||
* Payed
|
||||
*/
|
||||
|
||||
$sql = "SELECT SUM(amount) as mm, date_format(f.datev,'%Y-%m') as dm";
|
||||
|
||||
@ -11,6 +11,7 @@ OptionModeVirtual=Option Credits-Debits
|
||||
OptionModeTrueDesc=In this context, the turnover is calculated over payments (date of payments). \nThe validity of the figures is assured only if the book-keeping is scrutinized through the input/output on the accounts via invoices.
|
||||
OptionModeVirtualDesc=In this context, the turnover is calculated over invoices (date of validation). When these invoices are due, whether they have been paid or not, they are listed in the turnover output.
|
||||
FeatureIsSupportedInInOutModeOnly=Feature only available in CREDITS-DEBTS accountancy mode (See Accountancy module configuration)
|
||||
VATReportBuildWithOptionDefinedInModule=Amounts shown here are calculated using rules defined by Tax module setup.
|
||||
Param=Setup
|
||||
AccountsGeneral=Accounts
|
||||
Account=Account
|
||||
|
||||
@ -11,6 +11,7 @@ OptionModeVirtual=Option Créances-Dettes
|
||||
OptionModeTrueDesc=Dans ce mode, le CA est calculé sur la base des paiements (date de réglement).\nLa validité des chiffres n'est donc assurée que si la tenue de la comptabilité passe rigoureusement par des entrées/sorties sur les comptes via des factures.
|
||||
OptionModeVirtualDesc=Dans ce mode, le CA est calculé sur la base des factures (date de validation). Payées ou non, elles apparaissent dans le résultat dès qu'elles sont dues.
|
||||
FeatureIsSupportedInInOutModeOnly=Fonction disponible uniquement en mode compta CREANCES-DETTES (Voir configuration du module compta)
|
||||
VATReportBuildWithOptionDefinedInModule=Les montants obtenus sont ceux calculées à partir des règles de calcul paramétrées pour le module Taxes.
|
||||
Param=Paramétrage
|
||||
AccountsGeneral=Comptes généraux
|
||||
Account=Compte
|
||||
|
||||
@ -128,9 +128,12 @@ function dol_get_next_month($month, $year)
|
||||
/** \brief Return GMT time for first day of a month or year
|
||||
* \param year Year
|
||||
* \param month Month
|
||||
* \return Timestamp Date for first day
|
||||
* \param gm False = Return date to compare with server TZ, True to compare with GM date.
|
||||
* Exemple: dol_get_first_day(1970,1,false) will return -3600 with TZ+1, after dol_print_date will return 1970-01-01 00:00:00
|
||||
* Exemple: dol_get_first_day(1970,1,true) will return 0 whatever is TZ, after dol_print_date will return 1970-01-01 00:00:00
|
||||
* \return Timestamp Date for first day
|
||||
*/
|
||||
function dol_get_first_day($year,$month=1,$gm=true)
|
||||
function dol_get_first_day($year,$month=1,$gm=false)
|
||||
{
|
||||
return dol_mktime(0,0,0,$month,1,$year,$gm);
|
||||
}
|
||||
@ -139,9 +142,10 @@ function dol_get_first_day($year,$month=1,$gm=true)
|
||||
/** \brief Return GMT time for last day of a month or year
|
||||
* \param year Year
|
||||
* \param month Month
|
||||
* \param gm False = Return date to compare with server TZ, True to compare with GM date.
|
||||
* \return Timestamp Date for first day
|
||||
*/
|
||||
function dol_get_last_day($year,$month=12,$gm=true)
|
||||
function dol_get_last_day($year,$month=12,$gm=false)
|
||||
{
|
||||
if ($month == 12)
|
||||
{
|
||||
|
||||
@ -101,13 +101,13 @@ if ($conf->categorie->enabled && !$user->rights->categorie->voir)
|
||||
if ($month > 0)
|
||||
{
|
||||
if ($year > 0)
|
||||
$sql.= " AND m.datem between '".$db->idate(dol_get_first_day($year,$month))."' AND '".$db->idate(dol_get_last_day($year,$month))."'";
|
||||
$sql.= " AND m.datem between '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'";
|
||||
else
|
||||
$sql.= " AND date_format(m.datem, '%m') = '$month'";
|
||||
}
|
||||
else if ($year > 0)
|
||||
{
|
||||
$sql.= " AND m.datem between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."'";
|
||||
$sql.= " AND m.datem between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
|
||||
}
|
||||
if (! empty($search_movment))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user