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

This commit is contained in:
Laurent Destailleur 2021-01-12 21:06:20 +01:00
commit eb2faed656
7 changed files with 40 additions and 35 deletions

View File

@ -224,9 +224,10 @@ if ($action == "confirm_update") {
$action = 'create'; $action = 'create';
$error++; $error++;
} }
if (!GETPOST('next_num_mvt', 'alpha')) if (!GETPOST('doc_ref', 'alpha'))
{ {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumPiece")), null, 'errors'); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Piece")), null, 'errors');
$action = 'create';
$error++; $error++;
} }
@ -371,7 +372,7 @@ if ($action == 'create')
print '</tr>'; print '</tr>';
print '<tr>'; print '<tr>';
print '<td>'.$langs->trans("Piece").'</td>'; print '<td class="fieldrequired">'.$langs->trans("Piece").'</td>';
print '<td><input type="text" class="minwidth200" name="doc_ref" value="'.GETPOST('doc_ref', 'alpha').'"></td>'; print '<td><input type="text" class="minwidth200" name="doc_ref" value="'.GETPOST('doc_ref', 'alpha').'"></td>';
print '</tr>'; print '</tr>';

View File

@ -820,6 +820,8 @@ class AccountancyExport
*/ */
public function exportFEC($objectLines) public function exportFEC($objectLines)
{ {
global $langs;
$separator = "\t"; $separator = "\t";
$end_line = "\r\n"; $end_line = "\r\n";
@ -853,55 +855,55 @@ class AccountancyExport
$date_validation = dol_print_date($line->date_validated, '%Y%m%d'); $date_validation = dol_print_date($line->date_validated, '%Y%m%d');
// FEC:JournalCode // FEC:JournalCode
print $line->code_journal.$separator; print $line->code_journal . $separator;
// FEC:JournalLib // FEC:JournalLib
print $line->journal_label.$separator; print dol_string_unaccent($langs->transnoentities($line->journal_label)) . $separator;
// FEC:EcritureNum // FEC:EcritureNum
print $line->piece_num.$separator; print $line->piece_num . $separator;
// FEC:EcritureDate // FEC:EcritureDate
print $date_document.$separator; print $date_document . $separator;
// FEC:CompteNum // FEC:CompteNum
print $line->numero_compte.$separator; print $line->numero_compte . $separator;
// FEC:CompteLib // FEC:CompteLib
print dol_string_unaccent($line->label_compte).$separator; print dol_string_unaccent($line->label_compte) . $separator;
// FEC:CompAuxNum // FEC:CompAuxNum
print $line->subledger_account.$separator; print $line->subledger_account . $separator;
// FEC:CompAuxLib // FEC:CompAuxLib
print dol_string_unaccent($line->subledger_label).$separator; print dol_string_unaccent($line->subledger_label) . $separator;
// FEC:PieceRef // FEC:PieceRef
print $line->doc_ref.$separator; print $line->doc_ref . $separator;
// FEC:PieceDate // FEC:PieceDate
print dol_string_unaccent($date_creation).$separator; print dol_string_unaccent($date_creation) . $separator;
// FEC:EcritureLib // FEC:EcritureLib
print dol_string_unaccent($line->label_operation).$separator; print dol_string_unaccent($line->label_operation) . $separator;
// FEC:Debit // FEC:Debit
print price2fec($line->debit).$separator; print price2fec($line->debit) . $separator;
// FEC:Credit // FEC:Credit
print price2fec($line->credit).$separator; print price2fec($line->credit) . $separator;
// FEC:EcritureLet // FEC:EcritureLet
print $line->lettering_code.$separator; print $line->lettering_code . $separator;
// FEC:DateLet // FEC:DateLet
print $date_lettering.$separator; print $date_lettering . $separator;
// FEC:ValidDate // FEC:ValidDate
print $date_validation.$separator; print $date_validation . $separator;
// FEC:Montantdevise // FEC:Montantdevise
print $line->multicurrency_amount.$separator; print $line->multicurrency_amount . $separator;
// FEC:Idevise // FEC:Idevise
print $line->multicurrency_code; print $line->multicurrency_code;
@ -919,6 +921,8 @@ class AccountancyExport
*/ */
public function exportFEC2($objectLines) public function exportFEC2($objectLines)
{ {
global $langs;
$separator = "\t"; $separator = "\t";
$end_line = "\r\n"; $end_line = "\r\n";
@ -955,7 +959,7 @@ class AccountancyExport
print $line->code_journal . $separator; print $line->code_journal . $separator;
// FEC:JournalLib // FEC:JournalLib
print $line->journal_label . $separator; print dol_string_unaccent($langs->transnoentities($line->journal_label)) . $separator;
// FEC:EcritureNum // FEC:EcritureNum
print $line->piece_num . $separator; print $line->piece_num . $separator;

View File

@ -126,7 +126,7 @@ class AccountingJournal extends CommonObject
$this->rowid = $obj->rowid; $this->rowid = $obj->rowid;
$this->code = $obj->code; $this->code = $obj->code;
$this->ref = $obj->code; $this->ref = $obj->code;
$this->label = $obj->label; $this->label = $obj->label;
$this->nature = $obj->nature; $this->nature = $obj->nature;
$this->active = $obj->active; $this->active = $obj->active;

View File

@ -549,7 +549,7 @@ if (!$error && $action == 'writebookkeeping') {
$bookkeeping->debit = ($mt >= 0 ? $mt : 0); $bookkeeping->debit = ($mt >= 0 ? $mt : 0);
$bookkeeping->credit = ($mt < 0 ? -$mt : 0); $bookkeeping->credit = ($mt < 0 ? -$mt : 0);
$bookkeeping->code_journal = $journal; $bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label; $bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id; $bookkeeping->fk_user_author = $user->id;
$bookkeeping->date_creation = $now; $bookkeeping->date_creation = $now;
@ -605,7 +605,7 @@ if (!$error && $action == 'writebookkeeping') {
$bookkeeping->debit = ($mt < 0 ? -$mt : 0); $bookkeeping->debit = ($mt < 0 ? -$mt : 0);
$bookkeeping->credit = ($mt >= 0) ? $mt : 0; $bookkeeping->credit = ($mt >= 0) ? $mt : 0;
$bookkeeping->code_journal = $journal; $bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label; $bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id; $bookkeeping->fk_user_author = $user->id;
$bookkeeping->date_creation = $now; $bookkeeping->date_creation = $now;
@ -737,7 +737,7 @@ if (!$error && $action == 'writebookkeeping') {
$bookkeeping->debit = ($mt < 0 ? -$mt : 0); $bookkeeping->debit = ($mt < 0 ? -$mt : 0);
$bookkeeping->credit = ($mt >= 0) ? $mt : 0; $bookkeeping->credit = ($mt >= 0) ? $mt : 0;
$bookkeeping->code_journal = $journal; $bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label; $bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id; $bookkeeping->fk_user_author = $user->id;
$bookkeeping->date_creation = $now; $bookkeeping->date_creation = $now;
$bookkeeping->label_compte = ''; $bookkeeping->label_compte = '';

View File

@ -223,7 +223,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->debit = ($mt <= 0) ? -$mt : 0; $bookkeeping->debit = ($mt <= 0) ? -$mt : 0;
$bookkeeping->credit = ($mt > 0) ? $mt : 0; $bookkeeping->credit = ($mt > 0) ? $mt : 0;
$bookkeeping->code_journal = $journal; $bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label; $bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id; $bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity; $bookkeeping->entity = $conf->entity;
@ -271,7 +271,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->debit = ($mt > 0) ? $mt : 0; $bookkeeping->debit = ($mt > 0) ? $mt : 0;
$bookkeeping->credit = ($mt <= 0) ? -$mt : 0; $bookkeeping->credit = ($mt <= 0) ? -$mt : 0;
$bookkeeping->code_journal = $journal; $bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label; $bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id; $bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity; $bookkeeping->entity = $conf->entity;
@ -329,7 +329,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->debit = ($mt > 0) ? $mt : 0; $bookkeeping->debit = ($mt > 0) ? $mt : 0;
$bookkeeping->credit = ($mt <= 0) ? -$mt : 0; $bookkeeping->credit = ($mt <= 0) ? -$mt : 0;
$bookkeeping->code_journal = $journal; $bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label; $bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id; $bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity; $bookkeeping->entity = $conf->entity;

View File

@ -322,7 +322,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->debit = ($mt <= 0) ? -$mt : 0; $bookkeeping->debit = ($mt <= 0) ? -$mt : 0;
$bookkeeping->credit = ($mt > 0) ? $mt : 0; $bookkeeping->credit = ($mt > 0) ? $mt : 0;
$bookkeeping->code_journal = $journal; $bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label; $bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id; $bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity; $bookkeeping->entity = $conf->entity;
@ -372,7 +372,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->debit = ($mt > 0) ? $mt : 0; $bookkeeping->debit = ($mt > 0) ? $mt : 0;
$bookkeeping->credit = ($mt <= 0) ? -$mt : 0; $bookkeeping->credit = ($mt <= 0) ? -$mt : 0;
$bookkeeping->code_journal = $journal; $bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label; $bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id; $bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity; $bookkeeping->entity = $conf->entity;
@ -433,7 +433,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->debit = ($mt > 0) ? $mt : 0; $bookkeeping->debit = ($mt > 0) ? $mt : 0;
$bookkeeping->credit = ($mt <= 0) ? -$mt : 0; $bookkeeping->credit = ($mt <= 0) ? -$mt : 0;
$bookkeeping->code_journal = $journal; $bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label; $bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id; $bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity; $bookkeeping->entity = $conf->entity;
@ -484,7 +484,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->debit = ($mt > 0) ? $mt : 0; $bookkeeping->debit = ($mt > 0) ? $mt : 0;
$bookkeeping->credit = ($mt <= 0) ? -$mt : 0; $bookkeeping->credit = ($mt <= 0) ? -$mt : 0;
$bookkeeping->code_journal = $journal; $bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label; $bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id; $bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity; $bookkeeping->entity = $conf->entity;

View File

@ -333,7 +333,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->debit = ($mt >= 0) ? $mt : 0; $bookkeeping->debit = ($mt >= 0) ? $mt : 0;
$bookkeeping->credit = ($mt < 0) ? -$mt : 0; $bookkeeping->credit = ($mt < 0) ? -$mt : 0;
$bookkeeping->code_journal = $journal; $bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label; $bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id; $bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity; $bookkeeping->entity = $conf->entity;
@ -383,7 +383,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->debit = ($mt < 0) ? -$mt : 0; $bookkeeping->debit = ($mt < 0) ? -$mt : 0;
$bookkeeping->credit = ($mt >= 0) ? $mt : 0; $bookkeeping->credit = ($mt >= 0) ? $mt : 0;
$bookkeeping->code_journal = $journal; $bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label; $bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id; $bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity; $bookkeeping->entity = $conf->entity;
@ -443,7 +443,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->debit = ($mt < 0) ? -$mt : 0; $bookkeeping->debit = ($mt < 0) ? -$mt : 0;
$bookkeeping->credit = ($mt >= 0) ? $mt : 0; $bookkeeping->credit = ($mt >= 0) ? $mt : 0;
$bookkeeping->code_journal = $journal; $bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label; $bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id; $bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity; $bookkeeping->entity = $conf->entity;