2
0
forked from Wavyzz/dolibarr

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
7 changed files with 40 additions and 35 deletions

View File

@@ -224,9 +224,10 @@ if ($action == "confirm_update") {
$action = 'create';
$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++;
}
@@ -371,7 +372,7 @@ if ($action == 'create')
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 '</tr>';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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