mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Zip export check if gmp is here #1902
This commit is contained in:
parent
64378e901a
commit
a4d4b2b96c
@ -46,6 +46,10 @@ class DownloadInvoices extends Job
|
|||||||
*/
|
*/
|
||||||
public function handle(UserMailer $userMailer)
|
public function handle(UserMailer $userMailer)
|
||||||
{
|
{
|
||||||
|
if (! extension_loaded('GMP')) {
|
||||||
|
die(trans('texts.gmp_required'));
|
||||||
|
}
|
||||||
|
|
||||||
$zip = Archive::instance_by_useragent(date('Y-m-d') . '_' . str_replace(' ', '_', trans('texts.invoice_pdfs')));
|
$zip = Archive::instance_by_useragent(date('Y-m-d') . '_' . str_replace(' ', '_', trans('texts.invoice_pdfs')));
|
||||||
|
|
||||||
foreach ($this->invoices as $invoice) {
|
foreach ($this->invoices as $invoice) {
|
||||||
|
@ -51,6 +51,10 @@ class DocumentReport extends AbstractReport
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isExport && $exportFormat == 'zip') {
|
if ($this->isExport && $exportFormat == 'zip') {
|
||||||
|
if (! extension_loaded('GMP')) {
|
||||||
|
die(trans('texts.gmp_required'));
|
||||||
|
}
|
||||||
|
|
||||||
$zip = Archive::instance_by_useragent(date('Y-m-d') . '_' . str_replace(' ', '_', trans('texts.documents')));
|
$zip = Archive::instance_by_useragent(date('Y-m-d') . '_' . str_replace(' ', '_', trans('texts.documents')));
|
||||||
foreach ($records as $record) {
|
foreach ($records as $record) {
|
||||||
foreach ($record->documents as $document) {
|
foreach ($record->documents as $document) {
|
||||||
|
@ -49,6 +49,10 @@ class ExpenseReport extends AbstractReport
|
|||||||
->where('expense_date', '<=', $this->endDate);
|
->where('expense_date', '<=', $this->endDate);
|
||||||
|
|
||||||
if ($this->isExport && $exportFormat == 'zip') {
|
if ($this->isExport && $exportFormat == 'zip') {
|
||||||
|
if (! extension_loaded('GMP')) {
|
||||||
|
die(trans('texts.gmp_required'));
|
||||||
|
}
|
||||||
|
|
||||||
$zip = Archive::instance_by_useragent(date('Y-m-d') . '_' . str_replace(' ', '_', trans('texts.expense_documents')));
|
$zip = Archive::instance_by_useragent(date('Y-m-d') . '_' . str_replace(' ', '_', trans('texts.expense_documents')));
|
||||||
foreach ($expenses->get() as $expense) {
|
foreach ($expenses->get() as $expense) {
|
||||||
foreach ($expense->documents as $document) {
|
foreach ($expense->documents as $document) {
|
||||||
|
@ -67,6 +67,10 @@ class InvoiceReport extends AbstractReport
|
|||||||
|
|
||||||
|
|
||||||
if ($this->isExport && $exportFormat == 'zip') {
|
if ($this->isExport && $exportFormat == 'zip') {
|
||||||
|
if (! extension_loaded('GMP')) {
|
||||||
|
die(trans('texts.gmp_required'));
|
||||||
|
}
|
||||||
|
|
||||||
$zip = Archive::instance_by_useragent(date('Y-m-d') . '_' . str_replace(' ', '_', trans('texts.invoice_documents')));
|
$zip = Archive::instance_by_useragent(date('Y-m-d') . '_' . str_replace(' ', '_', trans('texts.invoice_documents')));
|
||||||
foreach ($clients->get() as $client) {
|
foreach ($clients->get() as $client) {
|
||||||
foreach ($client->invoices as $invoice) {
|
foreach ($client->invoices as $invoice) {
|
||||||
|
@ -58,6 +58,10 @@ class QuoteReport extends AbstractReport
|
|||||||
}]);
|
}]);
|
||||||
|
|
||||||
if ($this->isExport && $exportFormat == 'zip') {
|
if ($this->isExport && $exportFormat == 'zip') {
|
||||||
|
if (! extension_loaded('GMP')) {
|
||||||
|
die(trans('texts.gmp_required'));
|
||||||
|
}
|
||||||
|
|
||||||
$zip = Archive::instance_by_useragent(date('Y-m-d') . '_' . str_replace(' ', '_', trans('texts.quote_documents')));
|
$zip = Archive::instance_by_useragent(date('Y-m-d') . '_' . str_replace(' ', '_', trans('texts.quote_documents')));
|
||||||
foreach ($clients->get() as $client) {
|
foreach ($clients->get() as $client) {
|
||||||
foreach ($client->invoices as $invoice) {
|
foreach ($client->invoices as $invoice) {
|
||||||
|
@ -2750,6 +2750,7 @@ $LANG = array(
|
|||||||
'email_address_changed_message' => 'The email address for your account has been changed from :old_email to :new_email.',
|
'email_address_changed_message' => 'The email address for your account has been changed from :old_email to :new_email.',
|
||||||
'test' => 'Test',
|
'test' => 'Test',
|
||||||
'beta' => 'Beta',
|
'beta' => 'Beta',
|
||||||
|
'gmp_required' => 'Exporting to ZIP requires the GMP extension',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user