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

This commit is contained in:
Laurent Destailleur 2019-10-11 16:10:21 +02:00
commit 520a2652e1
2 changed files with 124 additions and 82 deletions

View File

@ -930,7 +930,7 @@ class AccountancyExport
{ {
$separator = ';'; $separator = ';';
$end_line = "\n"; $end_line = "\r\n";
foreach ($objectLines as $line) { foreach ($objectLines as $line) {
@ -984,8 +984,9 @@ class AccountancyExport
print $separator; print $separator;
} }
*/ */
print $separator; // deprecated CPTG & CPTA use instead
// MONT // MONT
print price(abs($line->montant)) . $separator; print price(abs($line->montant), 0, '', 1, 2) . $separator;
// CODC // CODC
print $line->sens . $separator; print $line->sens . $separator;
// CPTG // CPTG
@ -999,15 +1000,54 @@ class AccountancyExport
// CPTA // CPTA
if (! empty($line->subledger_account)) { if (! empty($line->subledger_account)) {
print length_accounta($line->subledger_account) . $separator; print length_accounta($line->subledger_account) . $separator;
} else {
print $separator;
} }
// CNAT // CNAT
if ($line->doc_type == 'supplier_invoice' && ! empty($line->subledger_account)) { if ($line->doc_type == 'supplier_invoice' && ! empty($line->subledger_account)) {
print 'F'; print 'F' . $separator;
} elseif ($line->doc_type == 'customer_invoice' && ! empty($line->subledger_account)) { } elseif ($line->doc_type == 'customer_invoice' && ! empty($line->subledger_account)) {
print 'C'; print 'C' . $separator;
} else { } else {
print ''; print $separator;
} }
// SECT
print $separator;
// CTRE
print $separator;
// NORL
print $separator;
// DATV
print $separator;
// REFD
print $line->doc_ref . $separator;
// CODH
print $separator;
// NSEQ
print $separator;
// MTDV
print '0' . $separator;
// CODV
print $separator;
// TXDV
print '0' . $separator;
// MOPM
print $separator;
// BONP
print $separator;
// BQAF
print $separator;
// ECES
print $separator;
// TXTL
print $separator;
// ECRM
print $separator;
// DATK
print $separator;
// HEUK
print $separator;
print $end_line; print $end_line;
} }
} }

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2015-2019 Frederic France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -82,6 +82,8 @@ class box_factures_imp extends ModeleBoxes
$facturestatic = new Facture($this->db); $facturestatic = new Facture($this->db);
$societestatic = new Societe($this->db); $societestatic = new Societe($this->db);
$langs->load("bills");
$this->info_box_head = array('text' => $langs->trans("BoxTitleOldestUnpaidCustomerBills", $max)); $this->info_box_head = array('text' => $langs->trans("BoxTitleOldestUnpaidCustomerBills", $max));
if ($user->rights->facture->lire) if ($user->rights->facture->lire)