diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 5eafa920973..e5d8aeb6f17 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2016 Alexandre Spangaro +/* Copyright (C) 2013-2016 Olivier Geffroy + * Copyright (C) 2013-2016 Florian Henry + * Copyright (C) 2013-2016 Alexandre Spangaro * * 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 @@ -19,8 +19,8 @@ */ /** - * \file htdocs/accountancy/bookkeeping/list.php - * \ingroup Advanced accountancy + * \file htdocs/accountancy/bookkeeping/list.php + * \ingroup Advanced accountancy * \brief List operation of book keeping */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 8c7fedbfa5c..d40d8147ef0 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -1,10 +1,11 @@ - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Florian Henry - * Copyright (C) 2015 Raphaël Doursenaud - * Copyright (C) 2016 Pierre-Henry Favre + * Copyright (C) 2007-2012 Laurent Destailleur + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Florian Henry + * Copyright (C) 2015 Raphaël Doursenaud + * Copyright (C) 2016 Pierre-Henry Favre + * Copyright (C) 2016 Alexandre Spangaro * * 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 @@ -21,7 +22,9 @@ */ /** - * \file htdocs/accountancy/class/accountancyexport.class.php + * \file htdocs/accountancy/class/accountancyexport.class.php + * \ingroup Advanced accountancy + * \brief Class accountancy export */ /** @@ -157,7 +160,7 @@ class AccountancyExport */ public function exportNormal($objectLines) { global $conf; - + foreach ( $objectLines as $line ) { // Std export $date = dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE); @@ -182,15 +185,16 @@ class AccountancyExport public function exportCegid($objectLines) { foreach ( $objectLines as $line ) { $date = dol_print_date($line->doc_date, '%d%m%Y'); + $separator = ";"; - print $date . $this->separator; - print $line->code_journal . $this->separator; - print length_accountg($line->numero_compte) . $this->separator; - print ' ' . $this->separator; - print $line->sens . $this->separator; - print price($line->montant) . $this->separator; - print dol_trunc($line->label_compte, 32) . $this->separator; - print $line->doc_ref . $this->separator; + print $date . $separator; + print $line->code_journal . $separator; + print length_accountg($line->numero_compte) . $separator; + print length_accounta($line->code_tiers) . $separator; + print $line->sens . $separator; + print price($line->montant) . $separator; + print $line->label_compte . $separator; + print $line->doc_ref; print $this->end_line; } } diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 3549651cbd6..c0a59689140 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -3,7 +3,7 @@ * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2014-2016 Florian Henry - * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2014 Juanjo Menent * * 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 @@ -103,13 +103,13 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both if (is_array($changeaccount) && count($changeaccount) > 0) { $error = 0; - + $db->begin(); - + $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as l"; $sql1 .= " SET l.fk_code_ventilation=" . $account_parent; $sql1 .= ' WHERE l.rowid IN (' . implode(',', $changeaccount) . ')'; - + dol_syslog('accountancy/customer/lines.php::changeaccount sql= ' . $sql1); $resql1 = $db->query($sql1); if (! $resql1) { @@ -223,7 +223,7 @@ $result = $db->query($sql); if ($result) { $num_lines = $db->num_rows($result); $i = 0; - + $param = ""; if ($search_invoice) $param .= "&search_invoice=" . $search_invoice; @@ -242,17 +242,17 @@ if ($result) { if ($search_tvaintra) $param .= "&search_tvaintra=" . $search_tvaintra; - + print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords); print '' . $langs->trans("DescVentilDoneCustomer") . ''; - + print '
'; print ''; - + print '
' . $langs->trans("ChangeAccount") . '
'; print $formventilation->select_account($account_parent, 'account_parent', 1); print '
'; - + print ''; print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); @@ -265,7 +265,7 @@ if ($result) { print_liste_field_titre($langs->trans("IntracommunityVATNumber"), $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Ventilate") . '
/', '', '', '', '', 'align="center"'); print "\n"; - + print ''; print ''; print ''; @@ -279,22 +279,22 @@ if ($result) { print '\n"; - + $facture_static = new Facture($db); $product_static = new Product($db); - + $var = True; while ( $objp = $db->fetch_object($result) ) { $var = ! $var; $codecompta = length_accountg($objp->account_number) . ' - ' . $objp->label_compte; - + print ''; - + // Ref Invoice $facture_static->ref = $objp->facnumber; - $facture_static->id = $objp->facid; + $facture_static->id = $objp->rowid; print ''; - + // Ref Product $product_static->ref = $objp->product_ref; $product_static->id = $objp->product_id; @@ -305,7 +305,7 @@ if ($result) { else print ' '; print ''; - + print ''; print ''; print ''; @@ -316,7 +316,7 @@ if ($result) { print ''; print ''; print ''; - + print ""; $i ++; } diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index c990465bacf..136fa27c314 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -4,9 +4,9 @@ * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Christophe Battarel - * Copyright (C) 2013-2016 Alexandre Spangaro - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013-2014 Olivier Geffroy * * 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 @@ -424,7 +424,7 @@ if ($action == 'export_csv') { } if ($reflabel == '(CustomerInvoicePayment)') { $reflabel = $langs->trans('Customer'); - } + } if ($reflabel == '(SocialContributionPayment)') { $reflabel = $langs->trans('SocialContribution'); } @@ -577,9 +577,13 @@ else { 'action' => '' ), '', $varlink); - print ''; + if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) { + print ''; + } else { + print ''; + } - print ''; + print ''; print '
'; print ''; print "
' . $facture_static->getNomUrl(1) . '' . dol_trunc($objp->product_label, 24) . '' . nl2br(dol_trunc($objp->description, 32)) . '' . price($objp->total_ht) . '' . $objp->country .'' . $objp->tva_intra . '