Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
648f4b1d8e
@ -540,7 +540,7 @@ if ($action == 'create') {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Date document creation
|
// Date document export
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="titlefield">'.$langs->trans("DateExport").'</td>';
|
print '<td class="titlefield">'.$langs->trans("DateExport").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -548,7 +548,7 @@ if ($action == 'create') {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Date document creation
|
// Date document validation
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="titlefield">'.$langs->trans("DateValidation").'</td>';
|
print '<td class="titlefield">'.$langs->trans("DateValidation").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -607,6 +607,7 @@ if ($action == 'create') {
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
$result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt
|
$result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt
|
||||||
|
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
@ -647,9 +648,14 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Add an empty line
|
// Add an empty line if there is not yet
|
||||||
$line = new BookKeepingLine();
|
if (!empty($object->linesmvt[0])) {
|
||||||
$object->linesmvt[] = $line;
|
$tmpline = $object->linesmvt[0];
|
||||||
|
if (!empty($tmpline->numero_compte)) {
|
||||||
|
$line = new BookKeepingLine();
|
||||||
|
$object->linesmvt[] = $line;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($object->linesmvt as $line) {
|
foreach ($object->linesmvt as $line) {
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|||||||
@ -606,9 +606,13 @@ class BookKeeping extends CommonObject
|
|||||||
if (empty($this->credit)) {
|
if (empty($this->credit)) {
|
||||||
$this->credit = 0;
|
$this->credit = 0;
|
||||||
}
|
}
|
||||||
|
if (empty($this->montant)) {
|
||||||
|
$this->montant = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$this->debit = price2num($this->debit, 'MT');
|
$this->debit = price2num($this->debit, 'MT');
|
||||||
$this->credit = price2num($this->credit, 'MT');
|
$this->credit = price2num($this->credit, 'MT');
|
||||||
|
$this->montant = price2num($this->montant, 'MT');
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
@ -1661,11 +1665,10 @@ class BookKeeping extends CommonObject
|
|||||||
$this->doc_date = $this->db->jdate($obj->doc_date);
|
$this->doc_date = $this->db->jdate($obj->doc_date);
|
||||||
$this->doc_ref = $obj->doc_ref;
|
$this->doc_ref = $obj->doc_ref;
|
||||||
$this->doc_type = $obj->doc_type;
|
$this->doc_type = $obj->doc_type;
|
||||||
$this->date_creation = $obj->date_creation;
|
$this->date_creation = $this->db->jdate($obj->date_creation);
|
||||||
$this->date_modification = $obj->date_modification;
|
$this->date_modification = $this->db->jdate($obj->date_modification);
|
||||||
$this->date_export = $obj->date_export;
|
$this->date_export = $this->db->jdate($obj->date_export);
|
||||||
$this->date_validation = $obj->date_validated;
|
$this->date_validation = $this->db->jdate($obj->date_validation);
|
||||||
$this->date_validation = $obj->date_validation;
|
|
||||||
} else {
|
} else {
|
||||||
$this->error = "Error ".$this->db->lasterror();
|
$this->error = "Error ".$this->db->lasterror();
|
||||||
dol_syslog(__METHOD__.$this->error, LOG_ERR);
|
dol_syslog(__METHOD__.$this->error, LOG_ERR);
|
||||||
|
|||||||
@ -342,7 +342,7 @@ function dol_shutdown()
|
|||||||
$depth = $db->transaction_opened;
|
$depth = $db->transaction_opened;
|
||||||
$disconnectdone = $db->close();
|
$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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user