1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 14:12:44 +01:00

Minor fixes

This commit is contained in:
Hillel Coren 2016-05-19 09:47:57 +03:00
parent 617ac98a75
commit 6caf1ff30d
4 changed files with 45 additions and 38 deletions

View File

@ -247,6 +247,8 @@ Route::group([
Route::get('api/gateways', array('as'=>'api.gateways', 'uses'=>'AccountGatewayController@getDatatable'));
Route::post('account_gateways/bulk', 'AccountGatewayController@bulk');
Route::get('bank_accounts/import_ofx', 'BankAccountController@showImportOFX');
Route::post('bank_accounts/import_ofx', 'BankAccountController@doImportOFX');
Route::resource('bank_accounts', 'BankAccountController');
Route::get('api/bank_accounts', array('as'=>'api.bank_accounts', 'uses'=>'BankAccountController@getDatatable'));
Route::post('bank_accounts/bulk', 'BankAccountController@bulk');

View File

@ -189,10 +189,13 @@ class ExpenseRepository extends BaseRepository
}
}
foreach ($expense->documents as $document){
if(!in_array($document->public_id, $document_ids)){
// Not checking permissions; deleting a document is just editing the invoice
$document->delete();
// prevent loading all of the documents if we don't have to
if ( ! $expense->wasRecentlyCreated) {
foreach ($expense->documents as $document){
if ( ! in_array($document->public_id, $document_ids)){
// Not checking permissions; deleting a document is just editing the invoice
$document->delete();
}
}
}

View File

@ -978,8 +978,8 @@ $LANG = array(
'first_page' => 'First page',
'all_pages' => 'All pages',
'last_page' => 'Last page',
'all_pages_header' => 'Show header on',
'all_pages_footer' => 'Show footer on',
'all_pages_header' => 'Show Header on',
'all_pages_footer' => 'Show Footer on',
'invoice_currency' => 'Invoice Currency',
'enable_https' => 'We strongly recommend using HTTPS to accept credit card details online.',
'quote_issued_to' => 'Quote issued to',
@ -1092,17 +1092,15 @@ $LANG = array(
'document_email_attachment' => 'Attach Documents',
'download_documents' => 'Download Documents (:size)',
'documents_from_expenses' => 'From Expenses:',
'dropzone' => array(// See http://www.dropzonejs.com/#config-dictDefaultMessage
'DefaultMessage' => 'Drop files or click to upload',
'FallbackMessage' => 'Your browser does not support drag\'n\'drop file uploads.',
'FallbackText' => 'Please use the fallback form below to upload your files like in the olden days.',
'FileTooBig' => 'File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.',
'InvalidFileType' => 'You can\'t upload files of this type.',
'ResponseError' => 'Server responded with {{statusCode}} code.',
'CancelUpload' => 'Cancel upload',
'CancelUploadConfirmation' => 'Are you sure you want to cancel this upload?',
'RemoveFile' => 'Remove file',
),
'dropzone_default_message' => 'Drop files or click to upload',
'dropzone_fallback_message' => 'Your browser does not support drag\'n\'drop file uploads.',
'dropzone_fallback_text' => 'Please use the fallback form below to upload your files like in the olden days.',
'dropzone_file_too_big' => 'File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.',
'dropzone_invalid_file_type' => 'You can\'t upload files of this type.',
'dropzone_response_error' => 'Server responded with {{statusCode}} code.',
'dropzone_cancel_upload' => 'Cancel upload',
'dropzone_cancel_upload_confirmation' => 'Are you sure you want to cancel this upload?',
'dropzone_remove_file' => 'Remove file',
'documents' => 'Documents',
'document_date' => 'Document Date',
'document_size' => 'Size',
@ -1279,7 +1277,11 @@ $LANG = array(
'no_payment_method_specified' => 'No payment method specified',
'chart_type' => 'Chart Type',
'format' => 'Format',
'import_ofx' => 'Import OFX',
'ofx_file' => 'OFX File',
'ofx_parse_failed' => 'Failed to parse OFX file',
// WePay
'wepay' => 'WePay',
@ -1307,4 +1309,4 @@ $LANG = array(
return $LANG;
?>.
?>