Merge pull request #22760 from aspangaro/17b11
NEW Accountancy - Added an option during export to export or not the lettering FPC21
This commit is contained in:
commit
688e8fe768
@ -700,6 +700,17 @@ if ($action == 'export_fileconfirm' && $user->hasRight('accounting', 'mouvements
|
|||||||
// Export files then exit
|
// Export files then exit
|
||||||
$accountancyexport = new AccountancyExport($db);
|
$accountancyexport = new AccountancyExport($db);
|
||||||
|
|
||||||
|
$notexportlettering = GETPOST('notexportlettering', 'alpha');
|
||||||
|
|
||||||
|
if (!empty($notexportlettering)) {
|
||||||
|
if (is_array($object->lines)) {
|
||||||
|
foreach ($object->lines as $k => $movement) {
|
||||||
|
unset($object->lines[$k]->lettering_code);
|
||||||
|
unset($object->lines[$k]->date_lettering);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$mimetype = $accountancyexport->getMimeType($formatexportset);
|
$mimetype = $accountancyexport->getMimeType($formatexportset);
|
||||||
|
|
||||||
top_httphead($mimetype, 1);
|
top_httphead($mimetype, 1);
|
||||||
@ -802,6 +813,19 @@ $formconfirm = '';
|
|||||||
if ($action == 'export_file') {
|
if ($action == 'export_file') {
|
||||||
$form_question = array();
|
$form_question = array();
|
||||||
|
|
||||||
|
if (getDolGlobalInt("ACCOUNTING_ENABLE_LETTERING")) {
|
||||||
|
// If 1, we check by default.
|
||||||
|
$checked = !empty($conf->global->ACCOUNTING_DEFAULT_NOT_EXPORT_LETTERING) ? 'true' : 'false';
|
||||||
|
$form_question['notexportlettering'] = array(
|
||||||
|
'name' => 'notexportlettering',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'label' => $langs->trans('NotExportLettering'),
|
||||||
|
'value' => $checked,
|
||||||
|
);
|
||||||
|
|
||||||
|
$form_question['separator'] = array('name'=>'separator', 'type'=>'separator');
|
||||||
|
}
|
||||||
|
|
||||||
// If 1 or not set, we check by default.
|
// If 1 or not set, we check by default.
|
||||||
$checked = (!isset($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE) || !empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE));
|
$checked = (!isset($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE) || !empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE));
|
||||||
$form_question['notifiedexportdate'] = array(
|
$form_question['notifiedexportdate'] = array(
|
||||||
@ -811,7 +835,7 @@ if ($action == 'export_file') {
|
|||||||
'value' => (!empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE) ? 'false' : 'true'),
|
'value' => (!empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE) ? 'false' : 'true'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$form_question['separator'] = array('name'=>'separator', 'type'=>'separator');
|
$form_question['separator2'] = array('name'=>'separator2', 'type'=>'separator');
|
||||||
|
|
||||||
if (!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) {
|
if (!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) {
|
||||||
// If 0 or not set, we NOT check by default.
|
// If 0 or not set, we NOT check by default.
|
||||||
@ -823,10 +847,10 @@ if ($action == 'export_file') {
|
|||||||
'value' => $checked,
|
'value' => $checked,
|
||||||
);
|
);
|
||||||
|
|
||||||
$form_question['separator2'] = array('name'=>'separator2', 'type'=>'separator');
|
$form_question['separator3'] = array('name'=>'separator3', 'type'=>'separator');
|
||||||
}
|
}
|
||||||
|
|
||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 300, 600);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 350, 600);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if ($action == 'delbookkeepingyear') {
|
//if ($action == 'delbookkeepingyear') {
|
||||||
|
|||||||
@ -337,6 +337,7 @@ ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Disable binding & transfer in accountanc
|
|||||||
ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Disable binding & transfer in accountancy on expense reports (expense reports will not be taken into account in accounting)
|
ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Disable binding & transfer in accountancy on expense reports (expense reports will not be taken into account in accounting)
|
||||||
|
|
||||||
## Export
|
## Export
|
||||||
|
NotExportLettering=Do not export the lettering when generating the file
|
||||||
NotifiedExportDate=Flag exported lines as Exported <span class="warning">(to modify a line, you will need to delete the whole transaction and re-transfert it into accounting)</span>
|
NotifiedExportDate=Flag exported lines as Exported <span class="warning">(to modify a line, you will need to delete the whole transaction and re-transfert it into accounting)</span>
|
||||||
NotifiedValidationDate=Validate and Lock the exported entries <span class="warning">(same effect than the "%s" feature, modification and deletion of the lines will DEFINITELY not be possible)</span>
|
NotifiedValidationDate=Validate and Lock the exported entries <span class="warning">(same effect than the "%s" feature, modification and deletion of the lines will DEFINITELY not be possible)</span>
|
||||||
DateValidationAndLock=Date validation and lock
|
DateValidationAndLock=Date validation and lock
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user