Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 13.0

This commit is contained in:
Laurent Destailleur 2021-02-09 18:30:47 +01:00
commit fdc2a88fc0
3 changed files with 8 additions and 5 deletions

View File

@ -742,11 +742,11 @@ class Commande extends CommonOrder
if ($usercanclose) if ($usercanclose)
{ {
$this->db->begin();
if ($this->statut == self::STATUS_CLOSED) if ($this->statut == self::STATUS_CLOSED)
{ {
return 0; return 0;
} }
$this->db->begin();
$now = dol_now(); $now = dol_now();

View File

@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
require_once DOL_DOCUMENT_ROOT.'/intracommreport/class/intracommreport.class.php'; require_once DOL_DOCUMENT_ROOT.'/intracommreport/class/intracommreport.class.php';
$langs->loadLangs(array("intracommreport")); $langs->loadLangs(array("intracommreport"));
var_dump($_POST);
$action = GETPOST('action'); $action = GETPOST('action');
$exporttype = GETPOSTISSET('exporttype') ? GETPOST('exporttype', 'alphanohtml') : 'deb'; // DEB ou DES $exporttype = GETPOSTISSET('exporttype') ? GETPOST('exporttype', 'alphanohtml') : 'deb'; // DEB ou DES
$year = GETPOSTINT('year'); $year = GETPOSTINT('year');

View File

@ -48,7 +48,9 @@ $object->fetch($loanid);
$echeances = new LoanSchedule($db); $echeances = new LoanSchedule($db);
$echeances->fetchAll($object->id); $echeances->fetchAll($object->id);
if ($object->paid > 0 && count($echeances->lines) == 0) $pay_without_schedule = 1; if ($object->paid > 0 && count($echeances->lines) == 0) {
$pay_without_schedule = 1;
}
/* /*
* Actions * Actions
@ -86,8 +88,9 @@ if ($action == 'createecheancier' && empty($pay_without_schedule)) {
$echeances->lines[] = $new_echeance; $echeances->lines[] = $new_echeance;
$i++; $i++;
} }
var_dump($result); if ($result > 0) {
if ($result > 0) $db->commit(); $db->commit();
}
} }
if ($action == 'updateecheancier' && empty($pay_without_schedule)) { if ($action == 'updateecheancier' && empty($pay_without_schedule)) {