Fix export and remove duplicate csv export.
This commit is contained in:
parent
8d9f6aad3f
commit
6c55bfc0f7
@ -79,6 +79,7 @@ $model_option = array (
|
|||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'update') {
|
if ($action == 'update') {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
@ -124,6 +125,8 @@ if ($action == 'update') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -130,11 +130,6 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
|
|||||||
$filter = array();
|
$filter = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* View
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ($action == 'export_csv') {
|
if ($action == 'export_csv') {
|
||||||
|
|
||||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||||
@ -156,13 +151,23 @@ if ($action == 'export_csv') {
|
|||||||
print price($line->credit - $line->debit) . $sep;
|
print price($line->credit - $line->debit) . $sep;
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
|
||||||
$title_page = $langs->trans("AccountBalance");
|
|
||||||
|
|
||||||
llxHeader('', $title_page);
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
|
$title_page = $langs->trans("AccountBalance");
|
||||||
|
|
||||||
|
llxHeader('', $title_page);
|
||||||
|
|
||||||
|
|
||||||
|
if ($action != 'export_csv')
|
||||||
|
{
|
||||||
// List
|
// List
|
||||||
$nbtotalofrecords = '';
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
|
|||||||
@ -44,7 +44,8 @@ class AccountancyExport
|
|||||||
/**
|
/**
|
||||||
* @var Type of export. Defined by $conf->global->ACCOUNTING_EXPORT_MODELCSV
|
* @var Type of export. Defined by $conf->global->ACCOUNTING_EXPORT_MODELCSV
|
||||||
*/
|
*/
|
||||||
public static $EXPORT_TYPE_NORMAL = 1; // Classic CSV
|
public static $EXPORT_TYPE_NORMAL = 1; // CSV
|
||||||
|
public static $EXPORT_TYPE_CONFIGURABLE = 10; // CSV
|
||||||
public static $EXPORT_TYPE_CEGID = 2;
|
public static $EXPORT_TYPE_CEGID = 2;
|
||||||
public static $EXPORT_TYPE_COALA = 3;
|
public static $EXPORT_TYPE_COALA = 3;
|
||||||
public static $EXPORT_TYPE_BOB50 = 4;
|
public static $EXPORT_TYPE_BOB50 = 4;
|
||||||
@ -53,7 +54,6 @@ class AccountancyExport
|
|||||||
public static $EXPORT_TYPE_EBP = 7;
|
public static $EXPORT_TYPE_EBP = 7;
|
||||||
public static $EXPORT_TYPE_COGILOG = 8;
|
public static $EXPORT_TYPE_COGILOG = 8;
|
||||||
public static $EXPORT_TYPE_AGIRIS = 9;
|
public static $EXPORT_TYPE_AGIRIS = 9;
|
||||||
public static $EXPORT_TYPE_CONFIGURABLE = 10;
|
|
||||||
public static $EXPORT_TYPE_FEC = 11;
|
public static $EXPORT_TYPE_FEC = 11;
|
||||||
|
|
||||||
|
|
||||||
@ -98,7 +98,8 @@ class AccountancyExport
|
|||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
return array (
|
return array (
|
||||||
self::$EXPORT_TYPE_NORMAL => $langs->trans('Modelcsv_normal'),
|
//self::$EXPORT_TYPE_NORMAL => $langs->trans('Modelcsv_normal'),
|
||||||
|
self::$EXPORT_TYPE_CONFIGURABLE => $langs->trans('Modelcsv_configurable'),
|
||||||
self::$EXPORT_TYPE_CEGID => $langs->trans('Modelcsv_CEGID'),
|
self::$EXPORT_TYPE_CEGID => $langs->trans('Modelcsv_CEGID'),
|
||||||
self::$EXPORT_TYPE_COALA => $langs->trans('Modelcsv_COALA'),
|
self::$EXPORT_TYPE_COALA => $langs->trans('Modelcsv_COALA'),
|
||||||
self::$EXPORT_TYPE_BOB50 => $langs->trans('Modelcsv_bob50'),
|
self::$EXPORT_TYPE_BOB50 => $langs->trans('Modelcsv_bob50'),
|
||||||
@ -107,7 +108,6 @@ class AccountancyExport
|
|||||||
self::$EXPORT_TYPE_EBP => $langs->trans('Modelcsv_ebp'),
|
self::$EXPORT_TYPE_EBP => $langs->trans('Modelcsv_ebp'),
|
||||||
self::$EXPORT_TYPE_COGILOG => $langs->trans('Modelcsv_cogilog'),
|
self::$EXPORT_TYPE_COGILOG => $langs->trans('Modelcsv_cogilog'),
|
||||||
self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris'),
|
self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris'),
|
||||||
self::$EXPORT_TYPE_CONFIGURABLE => $langs->trans('Modelcsv_configurable'),
|
|
||||||
self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'),
|
self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -123,13 +123,13 @@ class AccountancyExport
|
|||||||
|
|
||||||
return array (
|
return array (
|
||||||
'param' => array(
|
'param' => array(
|
||||||
self::$EXPORT_TYPE_NORMAL => array(
|
/*self::$EXPORT_TYPE_NORMAL => array(
|
||||||
'label' => $langs->trans('Modelcsv_normal'),
|
'label' => $langs->trans('Modelcsv_normal'),
|
||||||
'ACCOUNTING_EXPORT_FORMAT' => empty($conf->global->ACCOUNTING_EXPORT_FORMAT)?'txt':$conf->global->ACCOUNTING_EXPORT_FORMAT,
|
'ACCOUNTING_EXPORT_FORMAT' => empty($conf->global->ACCOUNTING_EXPORT_FORMAT)?'txt':$conf->global->ACCOUNTING_EXPORT_FORMAT,
|
||||||
'ACCOUNTING_EXPORT_SEPARATORCSV' => empty($conf->global->ACCOUNTING_EXPORT_SEPARATORCSV)?',':$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV,
|
'ACCOUNTING_EXPORT_SEPARATORCSV' => empty($conf->global->ACCOUNTING_EXPORT_SEPARATORCSV)?',':$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV,
|
||||||
'ACCOUNTING_EXPORT_ENDLINE' => empty($conf->global->ACCOUNTING_EXPORT_ENDLINE)?1:$conf->global->ACCOUNTING_EXPORT_ENDLINE,
|
'ACCOUNTING_EXPORT_ENDLINE' => empty($conf->global->ACCOUNTING_EXPORT_ENDLINE)?1:$conf->global->ACCOUNTING_EXPORT_ENDLINE,
|
||||||
'ACCOUNTING_EXPORT_DATE' => empty($conf->global->ACCOUNTING_EXPORT_DATE)?'%d%m%Y':$conf->global->ACCOUNTING_EXPORT_DATE,
|
'ACCOUNTING_EXPORT_DATE' => empty($conf->global->ACCOUNTING_EXPORT_DATE)?'%d%m%Y':$conf->global->ACCOUNTING_EXPORT_DATE,
|
||||||
),
|
),*/
|
||||||
self::$EXPORT_TYPE_CEGID => array(
|
self::$EXPORT_TYPE_CEGID => array(
|
||||||
'label' => $langs->trans('Modelcsv_CEGID'),
|
'label' => $langs->trans('Modelcsv_CEGID'),
|
||||||
),
|
),
|
||||||
@ -205,8 +205,12 @@ class AccountancyExport
|
|||||||
|
|
||||||
switch ($conf->global->ACCOUNTING_EXPORT_MODELCSV) {
|
switch ($conf->global->ACCOUNTING_EXPORT_MODELCSV) {
|
||||||
case self::$EXPORT_TYPE_NORMAL :
|
case self::$EXPORT_TYPE_NORMAL :
|
||||||
$this->exportNormal($TData);
|
/*$this->exportNormal($TData);
|
||||||
|
break;*/
|
||||||
|
case self::$EXPORT_TYPE_CONFIGURABLE :
|
||||||
|
$this->exportConfigurable($TData);
|
||||||
break;
|
break;
|
||||||
|
case self::$EXPORT_TYPE_NORMAL :
|
||||||
case self::$EXPORT_TYPE_CEGID :
|
case self::$EXPORT_TYPE_CEGID :
|
||||||
$this->exportCegid($TData);
|
$this->exportCegid($TData);
|
||||||
break;
|
break;
|
||||||
@ -231,9 +235,6 @@ class AccountancyExport
|
|||||||
case self::$EXPORT_TYPE_AGIRIS :
|
case self::$EXPORT_TYPE_AGIRIS :
|
||||||
$this->exportAgiris($TData);
|
$this->exportAgiris($TData);
|
||||||
break;
|
break;
|
||||||
case self::$EXPORT_TYPE_CONFIGURABLE :
|
|
||||||
$this->exportConfigurable($TData);
|
|
||||||
break;
|
|
||||||
case self::$EXPORT_TYPE_FEC :
|
case self::$EXPORT_TYPE_FEC :
|
||||||
$this->exportFEC($TData);
|
$this->exportFEC($TData);
|
||||||
break;
|
break;
|
||||||
@ -250,6 +251,7 @@ class AccountancyExport
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
/* Use $EXPORT_TYPE_CONFIGURABLE instead
|
||||||
public function exportNormal($objectLines)
|
public function exportNormal($objectLines)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
@ -267,6 +269,7 @@ class AccountancyExport
|
|||||||
print $this->end_line;
|
print $this->end_line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export format : CEGID
|
* Export format : CEGID
|
||||||
|
|||||||
@ -266,7 +266,7 @@ Modelcsv_quadratus=Export towards Quadratus QuadraCompta
|
|||||||
Modelcsv_ebp=Export towards EBP
|
Modelcsv_ebp=Export towards EBP
|
||||||
Modelcsv_cogilog=Export towards Cogilog
|
Modelcsv_cogilog=Export towards Cogilog
|
||||||
Modelcsv_agiris=Export towards Agiris
|
Modelcsv_agiris=Export towards Agiris
|
||||||
Modelcsv_configurable=Export Configurable
|
Modelcsv_configurable=Export CSV Configurable
|
||||||
Modelcsv_FEC=Export FEC (Art. L47 A) (Test)
|
Modelcsv_FEC=Export FEC (Art. L47 A) (Test)
|
||||||
ChartofaccountsId=Chart of accounts Id
|
ChartofaccountsId=Chart of accounts Id
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user