NEW Can select the export format during export of journals
This commit is contained in:
parent
4bf7c6f84c
commit
49a403b4a5
@ -729,6 +729,7 @@ if ($action == 'export_fileconfirm' && $user->hasRight('accounting', 'mouvements
|
|||||||
// Export files then exit
|
// Export files then exit
|
||||||
$accountancyexport = new AccountancyExport($db);
|
$accountancyexport = new AccountancyExport($db);
|
||||||
|
|
||||||
|
$formatexport = GETPOST('formatexport', 'int');
|
||||||
$notexportlettering = GETPOST('notexportlettering', 'alpha');
|
$notexportlettering = GETPOST('notexportlettering', 'alpha');
|
||||||
|
|
||||||
if (!empty($notexportlettering)) {
|
if (!empty($notexportlettering)) {
|
||||||
@ -745,7 +746,7 @@ if ($action == 'export_fileconfirm' && $user->hasRight('accounting', 'mouvements
|
|||||||
$withAttachment = !empty(trim(GETPOST('notifiedexportfull', 'alphanohtml'))) ? 1 : 0;
|
$withAttachment = !empty(trim(GETPOST('notifiedexportfull', 'alphanohtml'))) ? 1 : 0;
|
||||||
|
|
||||||
// Output data on screen or download
|
// Output data on screen or download
|
||||||
$result = $accountancyexport->export($object->lines, $formatexportset, $withAttachment);
|
$result = $accountancyexport->export($object->lines, $formatexport, $withAttachment);
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
@ -856,11 +857,13 @@ $formconfirm = '';
|
|||||||
if ($action == 'export_file') {
|
if ($action == 'export_file') {
|
||||||
$form_question = array();
|
$form_question = array();
|
||||||
|
|
||||||
$form_question['notexportlettering'] = array(
|
$form_question['formatexport'] = array(
|
||||||
'name' => 'notexportlettering',
|
'name' => 'formatexport',
|
||||||
'type' => 'other',
|
'type' => 'select',
|
||||||
'label' => '', // TODO Use Selectmodelcsv and show a select combo
|
'label' => $langs->trans('Modelcsv'), // TODO Use Selectmodelcsv and show a select combo
|
||||||
'value' => $langs->trans('Modelcsv').' : <b>'.$listofformat[$formatexportset].'</b>'
|
'values' => $listofformat,
|
||||||
|
'default' => $formatexportset,
|
||||||
|
'morecss' => 'minwidth200 maxwidth200'
|
||||||
);
|
);
|
||||||
|
|
||||||
$form_question['separator0'] = array('name'=>'separator0', 'type'=>'separator');
|
$form_question['separator0'] = array('name'=>'separator0', 'type'=>'separator');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user