forked from Wavyzz/dolibarr
FIX #21174
This commit is contained in:
@@ -604,6 +604,7 @@ if ($action == 'create') {
|
||||
print '<br>';
|
||||
|
||||
$result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt
|
||||
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
@@ -643,9 +644,14 @@ if ($action == 'create') {
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
// Add an empty line
|
||||
$line = new BookKeepingLine();
|
||||
$object->linesmvt[] = $line;
|
||||
// Add an empty line if there is not yet
|
||||
if (!empty($object->linesmvt[0])) {
|
||||
$tmpline = $object->linesmvt[0];
|
||||
if (!empty($tmpline->numero_compte)) {
|
||||
$line = new BookKeepingLine();
|
||||
$object->linesmvt[] = $line;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($object->linesmvt as $line) {
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
@@ -597,9 +597,13 @@ class BookKeeping extends CommonObject
|
||||
if (empty($this->credit)) {
|
||||
$this->credit = 0;
|
||||
}
|
||||
if (empty($this->montant)) {
|
||||
$this->montant = 0;
|
||||
}
|
||||
|
||||
$this->debit = price2num($this->debit, 'MT');
|
||||
$this->credit = price2num($this->credit, 'MT');
|
||||
$this->montant = price2num($this->montant, 'MT');
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ function dol_shutdown()
|
||||
$depth = $db->transaction_opened;
|
||||
$disconnectdone = $db->close();
|
||||
}
|
||||
dol_syslog("--- End access to ".$_SERVER["PHP_SELF"].(($disconnectdone && $depth) ? ' (Warn: db disconnection forced, transaction depth was '.$depth.')' : ''), (($disconnectdone && $depth) ?LOG_WARNING:LOG_INFO));
|
||||
dol_syslog("--- End access to ".$_SERVER["PHP_SELF"].(($disconnectdone && $depth) ? ' (Warn: db disconnection forced, transaction depth was '.$depth.')' : ''), (($disconnectdone && $depth) ? LOG_WARNING : LOG_INFO));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user