mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-16 14:31:29 +01:00
Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/actions_sendmails.inc.php htdocs/loan/card.php htdocs/loan/class/loan.class.php
This commit is contained in:
@@ -2259,6 +2259,7 @@ class Facture extends CommonInvoice
|
|||||||
else $result=$mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarr",$num));
|
else $result=$mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarr",$num));
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
|
$this->error = $mouvP->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -308,6 +308,9 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu
|
|||||||
else if ($feature == 'ftp')
|
else if ($feature == 'ftp')
|
||||||
{
|
{
|
||||||
if (! $user->rights->ftp->write) $deleteok=0;
|
if (! $user->rights->ftp->write) $deleteok=0;
|
||||||
|
}else if ($feature == 'salaries')
|
||||||
|
{
|
||||||
|
if (! $user->rights->salaries->delete) $deleteok=0;
|
||||||
}
|
}
|
||||||
else if ($feature == 'salaries')
|
else if ($feature == 'salaries')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -559,7 +559,7 @@ if (! empty($valid_dashboardlines))
|
|||||||
$boxwork.='<tr class="nohover"><td class="tdboxstats nohover flexcontainer centpercent">';
|
$boxwork.='<tr class="nohover"><td class="tdboxstats nohover flexcontainer centpercent">';
|
||||||
foreach($valid_dashboardlines as $board)
|
foreach($valid_dashboardlines as $board)
|
||||||
{
|
{
|
||||||
if (empty($boad->nbtodo)) $nbworkboardempty++;
|
if (empty($board->nbtodo)) $nbworkboardempty++;
|
||||||
|
|
||||||
$textlate = $langs->trans("NActionsLate",$board->nbtodolate);
|
$textlate = $langs->trans("NActionsLate",$board->nbtodolate);
|
||||||
$textlate.= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')';
|
$textlate.= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')';
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$error++;
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -344,13 +345,13 @@ if ($action == 'create')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Accountancy_account_insurance
|
// Accountancy_account_insurance
|
||||||
print '<tr><td>'.$langs->trans("LoanAccountancyInsuranceCode").'</td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("LoanAccountancyInsuranceCode").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formaccounting->select_account($object->accountancy_account_insurance, 'accountancy_account_insurance', 1, '', 0, 1);
|
print $formaccounting->select_account($object->accountancy_account_insurance, 'accountancy_account_insurance', 1, '', 0, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Accountancy_account_interest
|
// Accountancy_account_interest
|
||||||
print '<tr><td>'.$langs->trans("LoanAccountancyInterestCode").'</td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("LoanAccountancyInterestCode").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formaccounting->select_account($object->accountancy_account_interest, 'accountancy_account_interest', 1, '', 0, 1);
|
print $formaccounting->select_account($object->accountancy_account_interest, 'accountancy_account_interest', 1, '', 0, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@@ -556,7 +557,7 @@ if ($id > 0)
|
|||||||
{
|
{
|
||||||
if (! empty($conf->accounting->enabled))
|
if (! empty($conf->accounting->enabled))
|
||||||
{
|
{
|
||||||
print $formaccounting->select_account($object->account_capital, 'accountancy_account_capital', 1, '', 0, 1);
|
print $formaccounting->select_account($object->account_capital, 'accountancy_account_capital', 1, '', 1, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -581,7 +582,7 @@ if ($id > 0)
|
|||||||
{
|
{
|
||||||
if (! empty($conf->accounting->enabled))
|
if (! empty($conf->accounting->enabled))
|
||||||
{
|
{
|
||||||
print $formaccounting->select_account($object->account_insurance, 'accountancy_account_insurance', 1, '', 0, 1);
|
print $formaccounting->select_account($object->account_insurance, 'accountancy_account_insurance', 1, '', 1, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -606,7 +607,7 @@ if ($id > 0)
|
|||||||
{
|
{
|
||||||
if (! empty($conf->accounting->enabled))
|
if (! empty($conf->accounting->enabled))
|
||||||
{
|
{
|
||||||
print $formaccounting->select_account($object->account_interest, 'accountancy_account_interest', 1, '', 0, 1);
|
print $formaccounting->select_account($object->account_interest, 'accountancy_account_interest', 1, '', 1, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -153,9 +153,19 @@ class Loan extends CommonObject
|
|||||||
$this->error="ErrorBadParameter";
|
$this->error="ErrorBadParameter";
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
if (($conf->accounting->enabled) && empty($this->account_capital) && empty($this->account_insurance) && empty($this->account_interest))
|
if (($conf->accounting->enabled) && empty($this->account_capital))
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Accounting"));
|
$this->error=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("LoanAccountancyCapitalCode"));
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
if (($conf->accounting->enabled) && empty($this->account_insurance))
|
||||||
|
{
|
||||||
|
$this->error=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("LoanAccountancyInsuranceCode"));
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
if (($conf->accounting->enabled) && empty($this->account_interest))
|
||||||
|
{
|
||||||
|
$this->error=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("LoanAccountancyInterestCode"));
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user