Skip to content

Commit

Permalink
Merge pull request #5768 from aspangaro/4.0-p49
Browse files Browse the repository at this point in the history
Fix: Accountancy - Problem on Cegid Export Format & presentation
  • Loading branch information
eldy committed Sep 22, 2016
2 parents 9c12444 + 9a3305a commit b2271bc
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 36 deletions.
10 changes: 5 additions & 5 deletions htdocs/accountancy/bookkeeping/list.php
@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
*
* 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
Expand All @@ -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';
Expand Down
36 changes: 20 additions & 16 deletions htdocs/accountancy/class/accountancyexport.class.php
@@ -1,10 +1,11 @@
<?php
/*
* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
* Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
*
* 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
Expand All @@ -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
*/

/**
Expand Down Expand Up @@ -157,7 +160,7 @@ public function export(&$TData) {
*/
public function exportNormal($objectLines) {
global $conf;

foreach ( $objectLines as $line ) {
// Std export
$date = dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
Expand All @@ -182,15 +185,16 @@ public function exportNormal($objectLines) {
public function exportCegid($objectLines) {
foreach ( $objectLines as $line ) {
$date = dol_print_date($line->doc_date, '%d%m%Y');

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;
$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;
}
}
Expand Down
16 changes: 10 additions & 6 deletions htdocs/accountancy/journal/bankjournal.php
Expand Up @@ -4,9 +4,9 @@
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
*
* 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
Expand Down Expand Up @@ -424,7 +424,7 @@
}
if ($reflabel == '(CustomerInvoicePayment)') {
$reflabel = $langs->trans('Customer');
}
}
if ($reflabel == '(SocialContributionPayment)') {
$reflabel = $langs->trans('SocialContribution');
}
Expand Down Expand Up @@ -577,9 +577,13 @@
'action' => ''
), '', $varlink);

print '<input type="button" class="button" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans('Export') . '" disabled="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else {
print '<input type="button" class="butAction" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
}

print '<input type="button" class="button" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';

print '
<script type="text/javascript">
Expand Down
6 changes: 3 additions & 3 deletions htdocs/accountancy/journal/purchasesjournal.php
Expand Up @@ -426,12 +426,12 @@
));

if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabeld="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabled="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else {
print '<input type="button" class="button" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
print '<input type="button" class="butAction" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
}

print '<input type="button" class="button" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';

print '
<script type="text/javascript">
Expand Down
12 changes: 6 additions & 6 deletions htdocs/accountancy/journal/sellsjournal.php
Expand Up @@ -7,7 +7,7 @@
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2014 Rapha�l Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
* 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
Expand All @@ -24,9 +24,9 @@
*/

/**
* \file htdocs/accountancy/journal/sellsjournal.php
* \ingroup Advanced accountancy
* \brief Page with sells journal
* \file htdocs/accountancy/journal/sellsjournal.php
* \ingroup Advanced accountancy
* \brief Page with sells journal
*/
require '../../main.inc.php';

Expand Down Expand Up @@ -444,12 +444,12 @@
));

if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabeld="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabled="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else {
print '<input type="button" class="butAction" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
}

print '<input type="button" class="button" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';

print '
<script type="text/javascript">
Expand Down

0 comments on commit b2271bc

Please sign in to comment.