';
@@ -157,7 +157,7 @@ if ($massaction == 'ventil') {
if ($monCompte <= 0)
{
- $msg .= '
';
$ko++;
} else {
$sql = " UPDATE ".MAIN_DB_PREFIX."facturedet";
@@ -165,14 +165,14 @@ if ($massaction == 'ventil') {
$sql .= " WHERE rowid = ".((int) $monId);
$accountventilated = new AccountingAccount($db);
- $accountventilated->fetch($monCompte, '');
+ $accountventilated->fetch($monCompte, '', 1);
dol_syslog("accountancy/customer/list.php sql=".$sql, LOG_DEBUG);
if ($db->query($sql)) {
- $msg .= '
';
$ko++;
}
}
diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php
index 77b8c6e57b9..c2fb21a911b 100644
--- a/htdocs/accountancy/expensereport/list.php
+++ b/htdocs/accountancy/expensereport/list.php
@@ -124,7 +124,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
if ($massaction == 'ventil') {
$msg = '';
- //print '
';
@@ -139,7 +139,7 @@ if ($massaction == 'ventil') {
if ($monCompte <= 0)
{
- $msg .= '
'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NoAccountSelected").'
';
+ $msg .= '
'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NoAccountSelected").'
';
$ko++;
} else {
$sql = " UPDATE ".MAIN_DB_PREFIX."expensereport_det";
@@ -147,14 +147,14 @@ if ($massaction == 'ventil') {
$sql .= " WHERE rowid = ".$monId;
$accountventilated = new AccountingAccount($db);
- $accountventilated->fetch($monCompte, '');
+ $accountventilated->fetch($monCompte, '', 1);
dol_syslog('accountancy/expensereport/list.php:: sql='.$sql, LOG_DEBUG);
if ($db->query($sql)) {
- $msg .= '
'.$langs->trans("LineOfExpenseReport").' '.$monId.' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
';
+ $msg .= '
'.$langs->trans("LineOfExpenseReport").' '.$monId.' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
';
$ok++;
} else {
- $msg .= '
'.$langs->trans("ErrorDB").' : '.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NotVentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
'.$sql.'
';
+ $msg .= '
'.$langs->trans("ErrorDB").' : '.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NotVentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
'.$sql.'
';
$ko++;
}
}
diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php
index 12fe8792401..4dd5df83152 100644
--- a/htdocs/accountancy/journal/bankjournal.php
+++ b/htdocs/accountancy/journal/bankjournal.php
@@ -93,12 +93,15 @@ $error = 0;
$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);
-// Period by default on transfer
-$dates = getDefaultDatesForTransfer();
-$date_start = $dates['date_start'];
-$date_end = $dates['date_end'];
-$pastmonthyear = $dates['pastmonthyear'];
-$pastmonth = $dates['pastmonth'];
+if (empty($date_startmonth) || empty($date_endmonth))
+{
+ // Period by default on transfer
+ $dates = getDefaultDatesForTransfer();
+ $date_start = $dates['date_start'];
+ $date_end = $dates['date_end'];
+ $pastmonthyear = $dates['pastmonthyear'];
+ $pastmonth = $dates['pastmonth'];
+}
if (!GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))) // We define date_start and date_end, only if we did not submit the form
{
diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php
index b24f8550e50..bf8275cee1c 100644
--- a/htdocs/accountancy/journal/expensereportsjournal.php
+++ b/htdocs/accountancy/journal/expensereportsjournal.php
@@ -73,12 +73,15 @@ $journal_label = $accountingjournalstatic->label;
$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);
-// Period by default on transfer
-$dates = getDefaultDatesForTransfer();
-$date_start = $dates['date_start'];
-$date_end = $dates['date_end'];
-$pastmonthyear = $dates['pastmonthyear'];
-$pastmonth = $dates['pastmonth'];
+if (empty($date_startmonth) || empty($date_endmonth))
+{
+ // Period by default on transfer
+ $dates = getDefaultDatesForTransfer();
+ $date_start = $dates['date_start'];
+ $date_end = $dates['date_end'];
+ $pastmonthyear = $dates['pastmonthyear'];
+ $pastmonth = $dates['pastmonth'];
+}
if (!GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))) // We define date_start and date_end, only if we did not submit the form
{
diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php
index 779c04f68fa..8e409b497b5 100644
--- a/htdocs/accountancy/journal/purchasesjournal.php
+++ b/htdocs/accountancy/journal/purchasesjournal.php
@@ -78,12 +78,15 @@ $journal_label = $accountingjournalstatic->label;
$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);
-// Period by default on transfer
-$dates = getDefaultDatesForTransfer();
-$date_start = $dates['date_start'];
-$date_end = $dates['date_end'];
-$pastmonthyear = $dates['pastmonthyear'];
-$pastmonth = $dates['pastmonth'];
+if (empty($date_startmonth) || empty($date_endmonth))
+{
+ // Period by default on transfer
+ $dates = getDefaultDatesForTransfer();
+ $date_start = $dates['date_start'];
+ $date_end = $dates['date_end'];
+ $pastmonthyear = $dates['pastmonthyear'];
+ $pastmonth = $dates['pastmonth'];
+}
if (!GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))) // We define date_start and date_end, only if we did not submit the form
{
diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php
index 998f34745ac..589bad72749 100644
--- a/htdocs/accountancy/journal/sellsjournal.php
+++ b/htdocs/accountancy/journal/sellsjournal.php
@@ -81,12 +81,15 @@ $journal_label = $accountingjournalstatic->label;
$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);
-// Period by default on transfer
-$dates = getDefaultDatesForTransfer();
-$date_start = $dates['date_start'];
-$date_end = $dates['date_end'];
-$pastmonthyear = $dates['pastmonthyear'];
-$pastmonth = $dates['pastmonth'];
+if (empty($date_startmonth) || empty($date_endmonth))
+{
+ // Period by default on transfer
+ $dates = getDefaultDatesForTransfer();
+ $date_start = $dates['date_start'];
+ $date_end = $dates['date_end'];
+ $pastmonthyear = $dates['pastmonthyear'];
+ $pastmonth = $dates['pastmonth'];
+}
if (!GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))) // We define date_start and date_end, only if we did not submit the form
{
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index 9e1668e1a35..96b36fa8fa3 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -146,7 +146,7 @@ if (empty($reshook))
if ($massaction == 'ventil') {
$msg = '';
- //print '
' . $langs->trans("Processing") . '...
';
+ //print '
' . $langs->trans("Processing") . '...
';
if (!empty($mesCasesCochees)) {
$msg = '
'.$langs->trans("SelectedLines").': '.count($mesCasesCochees).'
';
$msg .= '
';
@@ -161,7 +161,7 @@ if ($massaction == 'ventil') {
if ($monCompte <= 0)
{
- $msg .= '
'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NoAccountSelected").'
';
+ $msg .= '
'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NoAccountSelected").'
';
$ko++;
} else {
$sql = " UPDATE ".MAIN_DB_PREFIX."facture_fourn_det";
@@ -169,14 +169,14 @@ if ($massaction == 'ventil') {
$sql .= " WHERE rowid = ".$monId;
$accountventilated = new AccountingAccount($db);
- $accountventilated->fetch($monCompte, '');
+ $accountventilated->fetch($monCompte, '', 1);
dol_syslog('accountancy/supplier/list.php:: sql='.$sql, LOG_DEBUG);
if ($db->query($sql)) {
- $msg .= '
'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
';
+ $msg .= '
'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
';
$ok++;
} else {
- $msg .= '
'.$langs->trans("ErrorDB").' : '.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NotVentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
'.$sql.'
';
+ $msg .= '
'.$langs->trans("ErrorDB").' : '.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NotVentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
'.$sql.'
';
$ko++;
}
}
diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang
index 464823810b2..adb87bcb8ca 100644
--- a/htdocs/langs/en_US/accountancy.lang
+++ b/htdocs/langs/en_US/accountancy.lang
@@ -18,7 +18,7 @@ DefaultForService=Default for service
DefaultForProduct=Default for product
CantSuggest=Can't suggest
AccountancySetupDoneFromAccountancyMenu=Most setup of the accountancy is done from the menu %s
-ConfigAccountingExpert=Configuration of the module accounting expert
+ConfigAccountingExpert=Configuration of the module accounting (double entry)
Journalization=Journalization
Journaux=Journals
JournalFinancial=Financial journals
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 49274730aeb..1498639d731 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -896,7 +896,7 @@ Permission1185=Approve purchase orders
Permission1186=Order purchase orders
Permission1187=Acknowledge receipt of purchase orders
Permission1188=Delete purchase orders
-Permission1189=Check/Uncheck a purhcase order reception
+Permission1189=Check/Uncheck a purchase order reception
Permission1190=Approve (second approval) purchase orders
Permission1191=Export supplier orders and their attributes
Permission1201=Get result of an export