Uniformize code of accounting report
This commit is contained in:
parent
c31febc4e0
commit
8248bc1c64
@ -84,8 +84,8 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
$date_start=dol_get_first_day($pastmonthyear,$pastmonth,false); $date_end=dol_get_last_day($pastmonthyear,$pastmonth,false);
|
||||
}
|
||||
|
||||
$nom=$langs->trans("PurchasesJournal");
|
||||
$nomlink='';
|
||||
$name=$langs->trans("PurchasesJournal");
|
||||
$namelink='';
|
||||
$periodlink='';
|
||||
$exportlink='';
|
||||
$builddate=time();
|
||||
@ -93,7 +93,8 @@ $description=$langs->trans("DescPurchasesJournal").'<br>';
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
|
||||
else $description.= $langs->trans("DepositsAreIncluded");
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
|
||||
|
||||
report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink);
|
||||
|
||||
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
|
||||
$idpays = $p[0];
|
||||
|
||||
@ -89,7 +89,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
}
|
||||
|
||||
$nom=$langs->trans("SellsJournal");
|
||||
$nomlink='';
|
||||
$namelink='';
|
||||
$periodlink='';
|
||||
$exportlink='';
|
||||
$builddate=time();
|
||||
@ -97,7 +97,7 @@ $description=$langs->trans("DescSellsJournal").'<br>';
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
|
||||
else $description.= $langs->trans("DepositsAreIncluded");
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
|
||||
report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink);
|
||||
|
||||
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
|
||||
$idpays = $p[0];
|
||||
@ -170,7 +170,7 @@ if ($result)
|
||||
$prev_progress = 0;
|
||||
if ($obj->type==Facture::TYPE_SITUATION) {
|
||||
// Avoid divide by 0
|
||||
if ($obj->situation_percent == 0) {
|
||||
if ($obj->situation_percent == 0) {
|
||||
$situation_ratio = 0;
|
||||
} else {
|
||||
$prev_progress = $line->get_prev_progress($obj->rowid); // id on invoice
|
||||
|
||||
@ -142,7 +142,7 @@ if ($calc==2) // Invoice for goods, payment for services
|
||||
$productsup=$langs->trans("Description");
|
||||
$amountsup=$langs->trans("AmountHT");
|
||||
}
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
|
||||
report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
|
||||
|
||||
|
||||
$vatcust=$langs->transcountry($local==1?"LT1":"LT2",$mysoc->country_code);
|
||||
@ -169,7 +169,7 @@ if($calc ==0 || $calc == 2)
|
||||
$parameters["end"] = $date_end;
|
||||
$parameters["direction"] = 'sell';
|
||||
$parameters["type"] = 'localtax'.$local;
|
||||
|
||||
|
||||
// Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('externalbalance'));
|
||||
$reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
@ -183,7 +183,7 @@ if($calc ==0 || $calc == 2)
|
||||
{
|
||||
if(($min == 0 or ($min > 0 && $coll->amount > $min)) && ($local==1?$coll->localtax1:$coll->localtax2) !=0)
|
||||
{
|
||||
|
||||
|
||||
$intra = str_replace($find,$replace,$coll->tva_intra);
|
||||
if(empty($intra))
|
||||
{
|
||||
@ -247,7 +247,7 @@ if($calc ==0 || $calc == 1){
|
||||
$coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'buy');
|
||||
$parameters["direction"] = 'buy';
|
||||
$parameters["type"] = 'localtax'.$local;
|
||||
|
||||
|
||||
$reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if (is_array($coll_list))
|
||||
{
|
||||
@ -258,7 +258,7 @@ if($calc ==0 || $calc == 1){
|
||||
{
|
||||
if(($min == 0 or ($min > 0 && $coll->amount > $min)) && ($local==1?$coll->localtax1:$coll->localtax2) != 0)
|
||||
{
|
||||
|
||||
|
||||
$intra = str_replace($find,$replace,$coll->tva_intra);
|
||||
if(empty($intra))
|
||||
{
|
||||
|
||||
@ -177,7 +177,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services
|
||||
$vatsup=$langs->trans("VATPaid");
|
||||
if ($mysoc->tva_assuj) $vatsup.=' ('.$langs->trans("ToGetBack").')';
|
||||
}
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
|
||||
report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
|
||||
|
||||
|
||||
if($local==1){
|
||||
@ -336,7 +336,7 @@ else
|
||||
if (! empty($fields['ddate_start'])) $type=1;
|
||||
if (! empty($fields['ddate_end'])) $type=1;
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
@ -499,7 +499,7 @@ else
|
||||
if (! empty($fields['ddate_start'])) $type=1;
|
||||
if (! empty($fields['ddate_end'])) $type=1;
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
|
||||
@ -64,7 +64,7 @@ if (! $sortfield) $sortfield='s.nom, s.rowid';
|
||||
if (! $sortorder) $sortorder='ASC';
|
||||
|
||||
// Date range
|
||||
$year=GETPOST("year");
|
||||
$year=GETPOST('year','int');
|
||||
if (empty($year))
|
||||
{
|
||||
$year_current = strftime("%Y",dol_now());
|
||||
@ -77,7 +77,8 @@ if (empty($year))
|
||||
}
|
||||
$date_start=dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear);
|
||||
$date_end=dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear);
|
||||
// Quarter
|
||||
|
||||
// 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;
|
||||
@ -105,11 +106,6 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO We define q
|
||||
|
||||
}
|
||||
|
||||
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
|
||||
$modecompta=(GETPOST("modecompta")?GETPOST("modecompta"):$conf->global->ACCOUNTING_MODE);
|
||||
@ -123,7 +119,7 @@ llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$nomlink='';
|
||||
$namelink='';
|
||||
$periodlink='';
|
||||
$exportlink='';
|
||||
|
||||
@ -158,9 +154,9 @@ else {
|
||||
|
||||
$hselected = 'report';
|
||||
|
||||
report_header($name,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta),$calcmode);
|
||||
report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta),$calcmode);
|
||||
|
||||
if (! empty($conf->accounting->enabled))
|
||||
if (! empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING')
|
||||
{
|
||||
print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1);
|
||||
}
|
||||
|
||||
@ -27,17 +27,60 @@
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
|
||||
$year_start=GETPOST('year_start');
|
||||
$year_current = strftime("%Y",time());
|
||||
$date_startmonth=GETPOST('date_startmonth');
|
||||
$date_startday=GETPOST('date_startday');
|
||||
$date_startyear=GETPOST('date_startyear');
|
||||
$date_endmonth=GETPOST('date_endmonth');
|
||||
$date_endday=GETPOST('date_endday');
|
||||
$date_endyear=GETPOST('date_endyear');
|
||||
|
||||
$nbofyear=4;
|
||||
if (! $year_start) {
|
||||
$year_start = $year_current - ($nbofyear-1);
|
||||
$year_end = $year_current;
|
||||
|
||||
// Date range
|
||||
$year=GETPOST('year','int');
|
||||
if (empty($year))
|
||||
{
|
||||
$year_current = strftime("%Y",dol_now());
|
||||
$month_current = strftime("%m",dol_now());
|
||||
$year_start = $year_current - ($nbofyear - 1);
|
||||
} else {
|
||||
$year_current = $year;
|
||||
$month_current = strftime("%m",dol_now());
|
||||
$year_start = $year - ($nbofyear - 1);
|
||||
}
|
||||
else {
|
||||
$year_end=$year_start + ($nbofyear-1);
|
||||
$date_start=dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear);
|
||||
$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;
|
||||
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);
|
||||
if (! GETPOST('month'))
|
||||
{
|
||||
if (! GETPOST("year") && $month_start > $month_current)
|
||||
{
|
||||
$year_start--;
|
||||
$year_end--;
|
||||
}
|
||||
$month_end=$month_start-1;
|
||||
if ($month_end < 1) $month_end=12;
|
||||
else $year_end++;
|
||||
}
|
||||
else $month_end=$month_start;
|
||||
$date_start=dol_get_first_day($year_start,$month_start,false); $date_end=dol_get_last_day($year_end,$month_end,false);
|
||||
}
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
|
||||
// Security check
|
||||
@ -59,16 +102,16 @@ llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$nomlink='';
|
||||
$namelink='';
|
||||
$exportlink='';
|
||||
|
||||
// Affiche en-tete du rapport
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
{
|
||||
$nom=$langs->trans("AnnualSummaryDueDebtMode");
|
||||
$name=$langs->trans("AnnualSummaryDueDebtMode");
|
||||
$calcmode=$langs->trans("CalcModeDebt");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
$period="$year_start - $year_end";
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
|
||||
$description=$langs->trans("RulesAmountWithTaxIncluded");
|
||||
$description.='<br>'.$langs->trans("RulesResultDue");
|
||||
@ -78,10 +121,10 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
}
|
||||
else {
|
||||
$nom=$langs->trans("AnnualSummaryInputOutputMode");
|
||||
$name=$langs->trans("AnnualSummaryInputOutputMode");
|
||||
$calcmode=$langs->trans("CalcModeEngagement");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||
$period="$year_start - $year_end";
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
|
||||
$description=$langs->trans("RulesAmountWithTaxIncluded");
|
||||
$description.='<br>'.$langs->trans("RulesResultInOut");
|
||||
@ -91,9 +134,9 @@ else {
|
||||
|
||||
$hselected='report';
|
||||
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta),$calcmode);
|
||||
report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta),$calcmode);
|
||||
|
||||
if (! empty($conf->accounting->enabled))
|
||||
if (! empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING')
|
||||
{
|
||||
print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1);
|
||||
}
|
||||
@ -103,6 +146,7 @@ if (! empty($conf->accounting->enabled))
|
||||
/*
|
||||
* Factures clients
|
||||
*/
|
||||
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016/17 Jamal Elbaz <jamelbaz@gmail.com>
|
||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
/* Copyright (C) 2016-2017 Jamal Elbaz <jamelbaz@gmail.com>
|
||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -17,17 +17,17 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/report/result.php
|
||||
* \ingroup Advanced accountancy
|
||||
* \file htdocs/compta/resultat/result.php
|
||||
* \ingroup compta, accountancy
|
||||
* \brief Page for accounting result
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancycategory.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancycategory.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
||||
|
||||
$error = 0;
|
||||
|
||||
@ -45,20 +45,68 @@ $cancel = GETPOST('cancel');
|
||||
$simple_report = GETPOST('simple_report');
|
||||
|
||||
|
||||
// Filter
|
||||
$year = GETPOST('year','int');
|
||||
if ($year == 0) {
|
||||
$year_current = strftime("%Y", time());
|
||||
$year_start = $year_current;
|
||||
$date_startmonth=GETPOST('date_startmonth');
|
||||
$date_startday=GETPOST('date_startday');
|
||||
$date_startyear=GETPOST('date_startyear');
|
||||
$date_endmonth=GETPOST('date_endmonth');
|
||||
$date_endday=GETPOST('date_endday');
|
||||
$date_endyear=GETPOST('date_endyear');
|
||||
|
||||
$nbofyear=1;
|
||||
|
||||
// Date range
|
||||
$year=GETPOST('year','int');
|
||||
if (empty($year))
|
||||
{
|
||||
$year_current = strftime("%Y",dol_now());
|
||||
$month_current = strftime("%m",dol_now());
|
||||
$year_start = $year_current - ($nbofyear - 1);
|
||||
} else {
|
||||
$year_current = $year;
|
||||
$year_start = $year;
|
||||
$month_current = strftime("%m",dol_now());
|
||||
$year_start = $year - ($nbofyear - 1);
|
||||
}
|
||||
$date_start=dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear);
|
||||
$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;
|
||||
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);
|
||||
if (! GETPOST('month'))
|
||||
{
|
||||
if (! GETPOST("year") && $month_start > $month_current)
|
||||
{
|
||||
$year_start--;
|
||||
$year_end--;
|
||||
}
|
||||
$month_end=$month_start-1;
|
||||
if ($month_end < 1) $month_end=12;
|
||||
else $year_end++;
|
||||
}
|
||||
else $month_end=$month_start;
|
||||
$date_start=dol_get_first_day($year_start,$month_start,false); $date_end=dol_get_last_day($year_end,$month_end,false);
|
||||
}
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
|
||||
if($cat_id == 0){
|
||||
$cat_id = null;
|
||||
}
|
||||
|
||||
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING')
|
||||
$modecompta = $conf->global->ACCOUNTING_MODE;
|
||||
if (! empty($conf->accounting->enabled)) $modecompta='BOOKKEEPING';
|
||||
if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta",'alpha');
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
@ -80,14 +128,60 @@ $form = new Form($db);
|
||||
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
|
||||
$textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
|
||||
|
||||
$nom = $langs->trans("ReportInOut").', '.$langs->trans("ByAccounts");
|
||||
$nomlink = '';
|
||||
$periodlink = '';
|
||||
$exportlink = '';
|
||||
$builddate = time();
|
||||
$description = '';
|
||||
$period = $langs->trans("Detail").' '. $form->selectyesno('simple_report',$simple_report,0) . " " .$textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear ;
|
||||
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
||||
|
||||
|
||||
// Affiche en-tete de rapport
|
||||
if ($modecompta=="CREANCES-DETTES")
|
||||
{
|
||||
$name=$langs->trans("AnnualByAccountDueDebtMode");
|
||||
$calcmode=$langs->trans("CalcModeDebt");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">','</a>').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
||||
$description=$langs->trans("RulesResultDue");
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
|
||||
else $description.= $langs->trans("DepositsAreIncluded");
|
||||
$builddate=time();
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
}
|
||||
else if ($modecompta=="RECETTES-DEPENSES") {
|
||||
$name=$langs->trans("AnnualByAccountInputOutputMode");
|
||||
$calcmode=$langs->trans("CalcModeEngagement");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.(GETPOST("month")>0?'&month='.GETPOST("month"):'').'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">','</a>').')';
|
||||
//$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1);
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
||||
$description=$langs->trans("RulesResultInOut");
|
||||
$builddate=time();
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
}
|
||||
else if ($modecompta=="BOOKKEEPING")
|
||||
{
|
||||
$name = $langs->trans("ReportInOut").', '.$langs->trans("ByAccounts");
|
||||
$calcmode=$langs->trans("CalcModeBookkeeping");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
$nomlink = '';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$period.=' '.$langs->trans("Detail").' '. $form->selectyesno('simple_report',$simple_report,0);
|
||||
$periodlink = $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear ;
|
||||
$exportlink = '';
|
||||
$description=$langs->trans("RulesResultDue");
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
|
||||
else $description.= $langs->trans("DepositsAreIncluded");
|
||||
$builddate = time();
|
||||
}
|
||||
|
||||
report_header($name, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('modecompta'=>$modecompta, 'action' => ''), $calcmode);
|
||||
|
||||
|
||||
if (! empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING')
|
||||
{
|
||||
print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
$moreforfilter='';
|
||||
|
||||
@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
|
||||
$langs->load("products");
|
||||
$langs->load("categories");
|
||||
@ -143,12 +143,14 @@ foreach($allparams as $key => $value) {
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
|
||||
// Show report header
|
||||
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByProductsAndServices");
|
||||
$name=$langs->trans("SalesTurnover").', '.$langs->trans("ByProductsAndServices");
|
||||
|
||||
if ($modecompta=="CREANCES-DETTES") {
|
||||
$calcmode=$langs->trans("CalcModeDebt");
|
||||
@ -176,9 +178,9 @@ if ($modecompta=="CREANCES-DETTES") {
|
||||
$builddate=time();
|
||||
}
|
||||
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$tableparams,$calcmode);
|
||||
report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink,$tableparams,$calcmode);
|
||||
|
||||
if (! empty($conf->accounting->enabled))
|
||||
if (! empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING')
|
||||
{
|
||||
print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1);
|
||||
}
|
||||
@ -266,7 +268,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
|
||||
// Category filter
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>';
|
||||
@ -283,11 +285,11 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
print $langs->trans("Type"). ': ';
|
||||
$form->select_type_of_lines(isset($selected_type)?$selected_type:-1,'search_type',1,1,1);
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '<td colspan="5" align="right">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
// Array header
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print_liste_field_titre(
|
||||
@ -357,7 +359,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
|
||||
if (count($name)) {
|
||||
foreach($name as $key=>$value) {
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Product
|
||||
@ -369,15 +371,15 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
}
|
||||
|
||||
print "<td>".$linkname."</td>\n";
|
||||
|
||||
|
||||
// Quantity
|
||||
print '<td align="right">';
|
||||
print $qty[$key];
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Percent;
|
||||
print '<td align="right">'.($qtytotal > 0 ? round(100 * $qty[$key] / $qtytotal, 2).'%' : ' ').'</td>';
|
||||
|
||||
|
||||
// Amount w/o VAT
|
||||
print '<td align="right">';
|
||||
/*if ($key > 0) {
|
||||
@ -388,7 +390,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
print price($amount_ht[$key]);
|
||||
//print '</a>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Amount with VAT
|
||||
print '<td align="right">';
|
||||
/*if ($key > 0) {
|
||||
@ -399,12 +401,12 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
print price($amount[$key]);
|
||||
//print '</a>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Percent;
|
||||
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||
|
||||
|
||||
// TODO: statistics?
|
||||
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
@ -423,7 +425,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
}
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
} else {
|
||||
// $modecompta != 'CREANCES-DETTES'
|
||||
|
||||
@ -131,12 +131,11 @@ foreach($allparams as $key => $value) {
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
// Show report header
|
||||
if ($modecompta=="CREANCES-DETTES") {
|
||||
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
|
||||
$name=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
|
||||
$calcmode=$langs->trans("CalcModeDebt");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
@ -147,7 +146,7 @@ if ($modecompta=="CREANCES-DETTES") {
|
||||
$builddate=time();
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
} else {
|
||||
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
|
||||
$name=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
|
||||
$calcmode=$langs->trans("CalcModeEngagement");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
@ -160,9 +159,9 @@ if ($modecompta=="CREANCES-DETTES") {
|
||||
$moreparam=array();
|
||||
if (! empty($modecompta)) $moreparam['modecompta']=$modecompta;
|
||||
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$moreparam,$calcmode);
|
||||
report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink,$moreparam,$calcmode);
|
||||
|
||||
if (! empty($conf->accounting->enabled))
|
||||
if (! empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING')
|
||||
{
|
||||
print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1);
|
||||
}
|
||||
@ -350,9 +349,9 @@ if (count($amount)) {
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
|
||||
|
||||
foreach($arrayforsort as $key => $value) {
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Third party
|
||||
|
||||
@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("categories");
|
||||
@ -165,7 +165,7 @@ $formother = new FormOther($db);
|
||||
// Show report header
|
||||
if ($modecompta=="CREANCES-DETTES")
|
||||
{
|
||||
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
|
||||
$name=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
|
||||
$calcmode=$langs->trans("CalcModeDebt");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
@ -176,7 +176,7 @@ if ($modecompta=="CREANCES-DETTES")
|
||||
$builddate=time();
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
} else {
|
||||
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
|
||||
$name=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
|
||||
$calcmode=$langs->trans("CalcModeEngagement");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
@ -187,9 +187,9 @@ if ($modecompta=="CREANCES-DETTES")
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
}
|
||||
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$tableparams,$calcmode);
|
||||
report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink,$tableparams,$calcmode);
|
||||
|
||||
if (! empty($conf->accounting->enabled))
|
||||
if (! empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING')
|
||||
{
|
||||
print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1);
|
||||
}
|
||||
|
||||
@ -25,21 +25,68 @@
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
|
||||
$date_startmonth=GETPOST('date_startmonth');
|
||||
$date_startday=GETPOST('date_startday');
|
||||
$date_startyear=GETPOST('date_startyear');
|
||||
$date_endmonth=GETPOST('date_endmonth');
|
||||
$date_endday=GETPOST('date_endday');
|
||||
$date_endyear=GETPOST('date_endyear');
|
||||
|
||||
$year_start=GETPOST("year_start");
|
||||
$year_current = strftime("%Y",time());
|
||||
$nbofyear=4;
|
||||
if (! $year_start) {
|
||||
$year_start = $year_current - ($nbofyear-1);
|
||||
$year_end = $year_current;
|
||||
|
||||
// Date range
|
||||
$year=GETPOST('year','int');
|
||||
if (empty($year))
|
||||
{
|
||||
$year_current = strftime("%Y",dol_now());
|
||||
$month_current = strftime("%m",dol_now());
|
||||
$year_start = $year_current - ($nbofyear - 1);
|
||||
} else {
|
||||
$year_current = $year;
|
||||
$month_current = strftime("%m",dol_now());
|
||||
$year_start = $year - ($nbofyear - 1);
|
||||
}
|
||||
else {
|
||||
$year_end=$year_start + ($nbofyear-1);
|
||||
$date_start=dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear);
|
||||
$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;
|
||||
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);
|
||||
if (! GETPOST('month'))
|
||||
{
|
||||
if (! GETPOST("year") && $month_start > $month_current)
|
||||
{
|
||||
$year_start--;
|
||||
$year_end--;
|
||||
}
|
||||
$month_end=$month_start-1;
|
||||
if ($month_end < 1) $month_end=12;
|
||||
else $year_end++;
|
||||
}
|
||||
else $month_end=$month_start;
|
||||
$date_start=dol_get_first_day($year_start,$month_start,false); $date_end=dol_get_last_day($year_end,$month_end,false);
|
||||
}
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
|
||||
$userid=GETPOST('userid','int');
|
||||
$socid = GETPOST('socid','int');
|
||||
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
|
||||
|
||||
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES' or 'BOOKKEEPING')
|
||||
$modecompta = $conf->global->ACCOUNTING_MODE;
|
||||
if (! empty($conf->accounting->enabled)) $modecompta='BOOKKEEPING';
|
||||
if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta",'alpha');
|
||||
|
||||
// Security check
|
||||
@ -55,16 +102,17 @@ if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accountin
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
// Affiche en-tete du rapport
|
||||
if ($modecompta=="CREANCES-DETTES")
|
||||
{
|
||||
$nom=$langs->trans("SalesTurnover");
|
||||
$name=$langs->trans("SalesTurnover");
|
||||
$calcmode=$langs->trans("CalcModeDebt");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">','</a>').')';
|
||||
$period="$year_start - $year_end";
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
|
||||
$description=$langs->trans("RulesCADue");
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
|
||||
@ -74,11 +122,11 @@ if ($modecompta=="CREANCES-DETTES")
|
||||
}
|
||||
else if ($modecompta=="RECETTES-DEPENSES")
|
||||
{
|
||||
$nom=$langs->trans("SalesTurnover");
|
||||
$name=$langs->trans("SalesTurnover");
|
||||
$calcmode=$langs->trans("CalcModeEngagement");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInBookkeepingMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=BOOKKEEPING">','</a>').')';
|
||||
$period="$year_start - $year_end";
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
|
||||
$description=$langs->trans("RulesCAIn");
|
||||
$description.= $langs->trans("DepositsAreIncluded");
|
||||
@ -87,23 +135,24 @@ else if ($modecompta=="RECETTES-DEPENSES")
|
||||
}
|
||||
else if ($modecompta=="BOOKKEEPING")
|
||||
{
|
||||
$nom=$langs->trans("BookkeepingTurnover");
|
||||
$name=$langs->trans("SalesTurnover");
|
||||
$calcmode=$langs->trans("CalcModeBookkeeping");
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||
$calcmode.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year_start='.$year_start.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
$period="$year_start - $year_end";
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year_start=".($year_start+1)."&modecompta=".$modecompta."'>".img_next()."</a>":"");
|
||||
$description=$langs->trans("RulesCABookkeeping");
|
||||
$description.= $langs->trans("DepositsAreIncluded");
|
||||
$description=$langs->trans("RulesCADue");
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
|
||||
else $description.= $langs->trans("DepositsAreIncluded");
|
||||
$builddate=time();
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
}
|
||||
|
||||
$moreparam=array();
|
||||
if (! empty($modecompta)) $moreparam['modecompta']=$modecompta;
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,$moreparam,$calcmode);
|
||||
report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink,$moreparam,$calcmode);
|
||||
|
||||
if (! empty($conf->accounting->enabled))
|
||||
if (! empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING')
|
||||
{
|
||||
print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1);
|
||||
}
|
||||
@ -252,7 +301,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
||||
{
|
||||
$mois_modulo = $mois;// ajout
|
||||
if($mois>12){$mois_modulo = $mois-12;} // ajout
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print "<td>".dol_print_date(dol_mktime(12,0,0,$mois_modulo,1,2000),"%B")."</td>";
|
||||
@ -342,7 +391,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
||||
/*
|
||||
for ($mois = 1 ; $mois < 13 ; $mois++)
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print "<td>".dol_print_date(dol_mktime(12,0,0,$mois,1,2000),"%B")."</td>";
|
||||
@ -510,7 +559,7 @@ print '</div>';
|
||||
$totalam_Rac += $obj->am;
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
print "<tr ".$bc[$var]."><td align=\"right\" colspan=\"5\"><i>Facture a encaisser : </i></td><td align=\"right\"><i>".price($total_ttc_Rac)."</i></td><td colspan=\"5\"><-- bug ici car n'exclut pas le deja r?gl? des factures partiellement r?gl?es</td></tr>";
|
||||
}
|
||||
$db->free($resql);
|
||||
@ -560,7 +609,7 @@ print '</div>';
|
||||
$total_pr += $obj->total_ttc-$obj->tot_fttc;
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
print "<tr ".$bc[$var]."><td align=\"right\" colspan=\"5\"><i>Signe et non facture:</i></td><td align=\"right\"><i>".price($total_pr)."</i></td><td colspan=\"5\"><-- bug ici, ca devrait exclure le deja facture</td></tr>";
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
@ -220,7 +220,7 @@ if ($modetax==0) { // Invoice for goods, payment for services
|
||||
$vatsup.=' ('.$langs->trans("ToGetBack").')';
|
||||
}
|
||||
}
|
||||
report_header($name,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
|
||||
report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
|
||||
|
||||
$vatcust=$langs->trans("VATReceived");
|
||||
$vatsup=$langs->trans("VATPaid");
|
||||
@ -260,7 +260,7 @@ if (is_array($coll_list)) {
|
||||
$i = 1;
|
||||
foreach ($coll_list as $coll) {
|
||||
if ($min == 0 or ($min > 0 && $coll->amount > $min)) {
|
||||
|
||||
|
||||
$intra = str_replace($find,$replace,$coll->tva_intra);
|
||||
if(empty($intra)) {
|
||||
if($coll->assuj == '1') {
|
||||
@ -340,7 +340,7 @@ if (is_array($coll_list)) {
|
||||
$i = 1;
|
||||
foreach ($coll_list as $coll) {
|
||||
if ($min == 0 or ($min > 0 && $coll->amount > $min)) {
|
||||
|
||||
|
||||
$intra = str_replace($find,$replace,$coll->tva_intra);
|
||||
if (empty($intra)) {
|
||||
if ($coll->assuj == '1') {
|
||||
|
||||
@ -133,7 +133,7 @@ $fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">';
|
||||
// Affiche en-tete du rapport
|
||||
if ($modetax==1) // Calculate on invoice for goods and services
|
||||
{
|
||||
$nom=$langs->trans("VATReportByQuartersInDueDebtMode");
|
||||
$name=$langs->trans("VATReportByQuartersInDueDebtMode");
|
||||
$calcmode=$langs->trans("CalcModeVATDebt");
|
||||
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
@ -172,7 +172,7 @@ if ($modetax==1) // Calculate on invoice for goods and services
|
||||
}
|
||||
if ($modetax==0) // Invoice for goods, payment for services
|
||||
{
|
||||
$nom=$langs->trans("VATReportByQuartersInInputOutputMode");
|
||||
$name=$langs->trans("VATReportByQuartersInInputOutputMode");
|
||||
$calcmode=$langs->trans("CalcModeVATEngagement");
|
||||
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
@ -210,7 +210,7 @@ if ($modetax==0) // Invoice for goods, payment for services
|
||||
if ($mysoc->tva_assuj) $vatsup.=' ('.$langs->trans("ToGetBack").')';
|
||||
|
||||
}
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
|
||||
report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
|
||||
|
||||
$vatcust=$langs->trans("VATReceived");
|
||||
$vatsup=$langs->trans("VATPaid");
|
||||
@ -396,7 +396,7 @@ else
|
||||
if (! empty($fields['ddate_start'])) $type=1;
|
||||
if (! empty($fields['ddate_end'])) $type=1;
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
@ -553,7 +553,7 @@ else
|
||||
if (! empty($fields['ddate_start'])) $type=1;
|
||||
if (! empty($fields['ddate_end'])) $type=1;
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
|
||||
@ -146,7 +146,7 @@ $fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">';
|
||||
|
||||
// Affiche en-tete du rapport
|
||||
if ($modetax==1) { // Calculate on invoice for goods and services
|
||||
$nom=$langs->trans("VATReportByQuartersInDueDebtMode");
|
||||
$name=$langs->trans("VATReportByQuartersInDueDebtMode");
|
||||
$calcmode=$langs->trans("CalcModeVATDebt");
|
||||
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
@ -195,7 +195,7 @@ if ($modetax==1) { // Calculate on invoice for goods and services
|
||||
}
|
||||
}
|
||||
if ($modetax==0) { // Invoice for goods, payment for services
|
||||
$nom=$langs->trans("VATReportByQuartersInInputOutputMode");
|
||||
$name=$langs->trans("VATReportByQuartersInInputOutputMode");
|
||||
$calcmode=$langs->trans("CalcModeVATEngagement");
|
||||
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
@ -244,7 +244,7 @@ if ($modetax==0) { // Invoice for goods, payment for services
|
||||
$vatsup.=' ('.$langs->trans("ToGetBack").')';
|
||||
}
|
||||
}
|
||||
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
|
||||
report_header($name,$namelink,$period,$periodlink,$description,$builddate,$exportlink,array(),$calcmode);
|
||||
|
||||
$vatcust=$langs->trans("VATReceived");
|
||||
$vatsup=$langs->trans("VATPaid");
|
||||
@ -373,18 +373,18 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
||||
print '<td align="right">'.$langs->trans("AmountHTVATRealReceived").'</td>';
|
||||
print '<td align="right">'.$vatcust.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
$action = "tvadetail";
|
||||
$parameters["mode"] = $modetax;
|
||||
$parameters["start"] = $date_start;
|
||||
$parameters["end"] = $date_end;
|
||||
$parameters["type"] = 'vat';
|
||||
|
||||
|
||||
$object = array(&$x_coll, &$x_paye, &$x_both);
|
||||
// Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('externalbalance'));
|
||||
$reshook=$hookmanager->executeHooks('addVatLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
||||
foreach (array_keys($x_coll) as $rate) {
|
||||
$subtot_coll_total_ht = 0;
|
||||
$subtot_coll_vat = 0;
|
||||
@ -408,7 +408,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
||||
$type=1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
@ -576,7 +576,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
||||
$type=1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
* @param string $exportlink Link for export or ''
|
||||
* @param array $moreparam Array with list of params to add into form
|
||||
* @param string $calcmode Calculation mode
|
||||
* @param string $varlink Add a variable into the address of the page
|
||||
* @param string $varlink Add a variable into the address of the page
|
||||
* @return void
|
||||
*/
|
||||
function report_header($nom,$variante,$period,$periodlink,$description,$builddate,$exportlink='',$moreparam=array(),$calcmode='', $varlink='')
|
||||
@ -43,9 +43,9 @@ function report_header($nom,$variante,$period,$periodlink,$description,$builddat
|
||||
global $langs;
|
||||
|
||||
if (empty($hselected)) $hselected='report';
|
||||
|
||||
|
||||
print "\n\n<!-- debut cartouche rapport -->\n";
|
||||
|
||||
|
||||
if(! empty($varlink)) $varlink = '?'.$varlink;
|
||||
|
||||
$h=0;
|
||||
@ -116,7 +116,7 @@ function report_header($nom,$variante,$period,$periodlink,$description,$builddat
|
||||
print '</form>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
print "\n<!-- fin cartouche rapport -->\n\n";
|
||||
}
|
||||
|
||||
|
||||
@ -249,9 +249,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
-- Balance
|
||||
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->accounting->enabled', __HANDLER__, 'left', 2435__+MAX_llx_menu__, 'accountancy', 'balance', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_balance', 'AccountBalance', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__);
|
||||
-- Reports
|
||||
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->accounting->enabled', __HANDLER__, 'left', 2440__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2400__+MAX_llx_menu__, '/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy_report', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __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->accounting->enabled', __HANDLER__, 'left', 2440__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2400__+MAX_llx_menu__, '/compta/resultat/result.php?mainmenu=accountancy&leftmenu=accountancy_report', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __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->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2441__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2440__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'ReportInOut', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 19, __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->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2442__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2441__+MAX_llx_menu__, '/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy_report', 'ByAccounts', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __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->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2442__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2441__+MAX_llx_menu__, '/compta/resultat/result.php?mainmenu=accountancy&leftmenu=accountancy_report', 'ByAccounts', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __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->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2443__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2441__+MAX_llx_menu__, '/compta/resultat/clientfourn.php?mainmenu=accountancy&leftmenu=accountancy_report', 'ByCompanies', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 20, __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->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2444__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2440__+MAX_llx_menu__, '/compta/stats/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'ReportTurnover', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 21, __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->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2445__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2444__+MAX_llx_menu__, '/compta/stats/casoc.php?mainmenu=accountancy&leftmenu=accountancy_report', 'ByCompanies', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 22, __ENTITY__);
|
||||
|
||||
@ -1118,10 +1118,10 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
// Reports
|
||||
$langs->load("compta");
|
||||
|
||||
$newmenu->add("/accountancy/report/result.php?mainmenu=accountancy&leftmenu=accountancy_report",$langs->trans("Reportings"),1,$user->rights->accounting->comptarapport->lire, '', $mainmenu, 'ca');
|
||||
$newmenu->add("/compta/resultat/result.php?mainmenu=accountancy&leftmenu=accountancy_report",$langs->trans("Reportings"),1,$user->rights->accounting->comptarapport->lire, '', $mainmenu, 'ca');
|
||||
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report",$langs->trans("ReportInOut"),2,$user->rights->accounting->comptarapport->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/accountancy/report/result.php?leftmenu=accountancy_report",$langs->trans("ByAccounts"),3,$user->rights->accounting->comptarapport->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report",$langs->trans("ByAccounts"),3,$user->rights->accounting->comptarapport->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report",$langs->trans("ByCompanies"),3,$user->rights->accounting->comptarapport->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report",$langs->trans("ReportTurnover"),2,$user->rights->accounting->comptarapport->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report",$langs->trans("ByCompanies"),3,$user->rights->accounting->comptarapport->lire);
|
||||
|
||||
@ -209,3 +209,20 @@ UPDATE llx_const set name = 'ONLINE_PAYMENT_NEWFORMTEXT' where name = 'PAYPAL_NE
|
||||
UPDATE llx_const set name = 'ONLINE_PAYMENT_LOGO' where name = 'PAYPAL_LOGO';
|
||||
|
||||
|
||||
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_bookkeeping MODIFY numero_compte VARCHAR(20) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_bookkeeping MODIFY numero_compte VARCHAR(20) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell VARCHAR(32) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell VARCHAR(32) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_buy VARCHAR(32) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_buy VARCHAR(32) COLLATE utf8_unicode_ci;
|
||||
|
||||
|
||||
|
||||
@ -134,6 +134,7 @@ CalcModeVATDebt=Mode <b>%sVAT on commitment accounting%s</b>.
|
||||
CalcModeVATEngagement=Mode <b>%sVAT on incomes-expenses%s</b>.
|
||||
CalcModeDebt=Mode <b>%sClaims-Debts%s</b> said <b>Commitment accounting</b>.
|
||||
CalcModeEngagement=Mode <b>%sIncomes-Expenses%s</b> said <b>cash accounting</b>
|
||||
CalcModeBookkeeping=Analysis of <b>data journalized in Bookkeeping Ledger table</b>
|
||||
CalcModeLT1= Mode <b>%sRE on customer invoices - suppliers invoices%s</b>
|
||||
CalcModeLT1Debt=Mode <b>%sRE on customer invoices%s</b>
|
||||
CalcModeLT1Rec= Mode <b>%sRE on suppliers invoices%s</b>
|
||||
@ -146,6 +147,7 @@ AnnualByCompaniesDueDebtMode=Balance of income and expenses, detail by third par
|
||||
AnnualByCompaniesInputOutputMode=Balance of income and expenses, detail by third parties, mode <b>%sIncomes-Expenses%s</b> said <b>cash accounting</b>.
|
||||
SeeReportInInputOutputMode=See report <b>%sIncomes-Expenses%s</b> said <b>cash accounting</b> for a calculation on actual payments made
|
||||
SeeReportInDueDebtMode=See report <b>%sClaims-Debts%s</b> said <b>commitment accounting</b> for a calculation on issued invoices
|
||||
SeeReportInBookkeepingMode=See report <b>%sBookeeping%s</b> for a calculation on bookkeeping table analysis
|
||||
RulesAmountWithTaxIncluded=- Amounts shown are with all taxes included
|
||||
RulesResultDue=- It includes outstanding invoices, expenses, VAT, donations whether they are paid or not. Is also includes paid salaries.<br>- It is based on the validation date of invoices and VAT and on the due date for expenses. For salaries defined with Salary module, the value date of payment is used.
|
||||
RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT and salaries. <br>- It is based on the payment dates of the invoices, expenses, VAT and salaries. The donation date for donation.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user