mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-11-09 07:53:29 -05:00
Move ExportPdfWriter out of export_helper.php into its own class file under App\Libraries so the PDF writer can be autoloaded and reused independently of the helper functions. - Add runtime detection of the PHP zip extension and surface it to the frontend via window.ospos_ext_zip_enabled (app/Views/partial/lang_lines.php) - Disable the XLSX export menu item in manage_tables.js and report_tables.js when ext-zip is missing, with a tooltip explaining why (new Common.export_xlsx_disabled_tooltip lang line) - Show Zip extension status on the system info page (app/Views/configs/system_info.php) - Document the new php-zip requirement and its optional nature for Excel/XLSX export in docs/BUILD.md and docs/INSTALL.md - Add explicit namespaces to helper test files (export_helperTest.php, tabular_helperTest.php, tax_helperTest.php) for consistency with PSR-4 autoloading This keeps the app fully functional without ext-zip, only disabling the Excel export feature that depends on openspout/openspout. Signed-off-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
23 lines
812 B
PHP
23 lines
812 B
PHP
<script type="text/javascript">
|
|
(function(lang, $) {
|
|
|
|
const lines = {
|
|
'common_submit': "<?= lang('Common.submit') ?>",
|
|
'common_close': "<?= lang('Common.close') ?>",
|
|
'common_export_all': "<?= lang('Common.export_all') ?>",
|
|
'common_export_page': "<?= lang('Common.export_page') ?>",
|
|
'common_export_scope_toggle': "<?= lang('Common.export_scope_toggle') ?>",
|
|
'common_export_xlsx_disabled_tooltip': "<?= lang('Common.export_xlsx_disabled_tooltip') ?>"
|
|
};
|
|
|
|
$.extend(lang, {
|
|
line: function(key) {
|
|
return lines[key];
|
|
}
|
|
});
|
|
|
|
})(window.lang = window.lang || {}, jQuery);
|
|
|
|
window.ospos_ext_zip_enabled = <?= extension_loaded('zip') ? 'true' : 'false' ?>;
|
|
</script>
|