mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 05:57:44 -04:00 
			
		
		
		
	Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
		
						commit
						152a64b526
					
				
							
								
								
									
										20
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								.travis.yml
									
									
									
									
									
								
							| @ -64,16 +64,16 @@ before_script: | |||||||
| 
 | 
 | ||||||
| script: | script: | ||||||
|   - php ./vendor/codeception/codeception/codecept run --debug acceptance AllPagesCept.php |   - php ./vendor/codeception/codeception/codecept run --debug acceptance AllPagesCept.php | ||||||
|   #- php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php |   - php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php | ||||||
|   #- php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php |   - php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php | ||||||
|   #- php ./vendor/codeception/codeception/codecept run --debug acceptance ClientCest.php |   - php ./vendor/codeception/codeception/codecept run --debug acceptance ClientCest.php | ||||||
|   #- php ./vendor/codeception/codeception/codecept run --debug acceptance CreditCest.php |   - php ./vendor/codeception/codeception/codecept run --debug acceptance CreditCest.php | ||||||
|   #- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceCest.php |   - php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceCest.php | ||||||
|   #- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceDesignCest.php |   - php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceDesignCest.php | ||||||
|   #- php ./vendor/codeception/codeception/codecept run acceptance OnlinePaymentCest.php |   - php ./vendor/codeception/codeception/codecept run acceptance OnlinePaymentCest.php | ||||||
|   #- php ./vendor/codeception/codeception/codecept run --debug acceptance PaymentCest.php |   - php ./vendor/codeception/codeception/codecept run --debug acceptance PaymentCest.php | ||||||
|   #- php ./vendor/codeception/codeception/codecept run --debug acceptance TaskCest.php |   - php ./vendor/codeception/codeception/codecept run --debug acceptance TaskCest.php | ||||||
|   #- php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php |   - php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php | ||||||
| 
 | 
 | ||||||
|   #- sed -i 's/NINJA_DEV=true/NINJA_PROD=true/g' .env |   #- sed -i 's/NINJA_DEV=true/NINJA_PROD=true/g' .env | ||||||
|   #- php ./vendor/codeception/codeception/codecept run acceptance GoProCest.php |   #- php ./vendor/codeception/codeception/codecept run acceptance GoProCest.php | ||||||
|  | |||||||
| @ -107,7 +107,6 @@ module.exports = function(grunt) { | |||||||
|           //'public/vendor/pdfmake/build/pdfmake.min.js',
 |           //'public/vendor/pdfmake/build/pdfmake.min.js',
 | ||||||
|           //'public/vendor/pdfmake/build/vfs_fonts.js',
 |           //'public/vendor/pdfmake/build/vfs_fonts.js',
 | ||||||
|           //'public/js/vfs_fonts.js',
 |           //'public/js/vfs_fonts.js',
 | ||||||
|           'public/js/lightbox.min.js', |  | ||||||
|           'public/js/bootstrap-combobox.js', |           'public/js/bootstrap-combobox.js', | ||||||
|           'public/js/script.js', |           'public/js/script.js', | ||||||
|           'public/js/pdf.pdfmake.js', |           'public/js/pdf.pdfmake.js', | ||||||
| @ -140,7 +139,6 @@ module.exports = function(grunt) { | |||||||
|           'public/vendor/spectrum/spectrum.css', |           'public/vendor/spectrum/spectrum.css', | ||||||
|           'public/css/bootstrap-combobox.css', |           'public/css/bootstrap-combobox.css', | ||||||
|           'public/css/typeahead.js-bootstrap.css', |           'public/css/typeahead.js-bootstrap.css', | ||||||
|           'public/css/lightbox.css', |  | ||||||
|           //'public/vendor/handsontable/dist/jquery.handsontable.full.css',
 |           //'public/vendor/handsontable/dist/jquery.handsontable.full.css',
 | ||||||
|           'public/css/style.css', |           'public/css/style.css', | ||||||
|         ], |         ], | ||||||
|  | |||||||
| @ -15,6 +15,7 @@ use Response; | |||||||
| use Request; | use Request; | ||||||
| use App\Models\Affiliate; | use App\Models\Affiliate; | ||||||
| use App\Models\License; | use App\Models\License; | ||||||
|  | use App\Models\Invoice; | ||||||
| use App\Models\User; | use App\Models\User; | ||||||
| use App\Models\Account; | use App\Models\Account; | ||||||
| use App\Models\Gateway; | use App\Models\Gateway; | ||||||
| @ -393,6 +394,21 @@ class AccountController extends BaseController | |||||||
| 
 | 
 | ||||||
|         if ($section == ACCOUNT_CUSTOMIZE_DESIGN) { |         if ($section == ACCOUNT_CUSTOMIZE_DESIGN) { | ||||||
|             $data['customDesign'] = ($account->custom_design && !$design) ? $account->custom_design : $design; |             $data['customDesign'] = ($account->custom_design && !$design) ? $account->custom_design : $design; | ||||||
|  | 
 | ||||||
|  |             // sample invoice to help determine variables
 | ||||||
|  |             $invoice = Invoice::scope() | ||||||
|  |                             ->with('client', 'account') | ||||||
|  |                             ->where('is_quote', '=', false) | ||||||
|  |                             ->where('is_recurring', '=', false) | ||||||
|  |                             ->first(); | ||||||
|  | 
 | ||||||
|  |             if ($invoice) { | ||||||
|  |                 $invoice->hidePrivateFields(); | ||||||
|  |                 unset($invoice->account); | ||||||
|  |                 unset($invoice->invoice_items); | ||||||
|  |                 unset($invoice->client->contacts); | ||||||
|  |                 $data['sampleInvoice'] = $invoice; | ||||||
|  |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         return View::make("accounts.{$section}", $data); |         return View::make("accounts.{$section}", $data); | ||||||
|  | |||||||
| @ -288,7 +288,7 @@ class AppController extends BaseController | |||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         if (Utils::getResllerType() == RESELLER_REVENUE_SHARE) { |         if (Utils::getResllerType() == RESELLER_REVENUE_SHARE) { | ||||||
|             $payments = DB::table('accounts') |             $data = DB::table('accounts') | ||||||
|                             ->leftJoin('payments', 'payments.account_id', '=', 'accounts.id') |                             ->leftJoin('payments', 'payments.account_id', '=', 'accounts.id') | ||||||
|                             ->leftJoin('clients', 'clients.id', '=', 'payments.client_id') |                             ->leftJoin('clients', 'clients.id', '=', 'payments.client_id') | ||||||
|                             ->where('accounts.account_key', '=', NINJA_ACCOUNT_KEY) |                             ->where('accounts.account_key', '=', NINJA_ACCOUNT_KEY) | ||||||
| @ -300,15 +300,9 @@ class AppController extends BaseController | |||||||
|                                 'payments.amount' |                                 'payments.amount' | ||||||
|                             ]); |                             ]); | ||||||
|         } else { |         } else { | ||||||
|             $payments = DB::table('accounts') |             $data = DB::table('users')->count(); | ||||||
|                             ->leftJoin('payments', 'payments.account_id', '=', 'accounts.id') |  | ||||||
|                             ->leftJoin('clients', 'clients.id', '=', 'payments.client_id') |  | ||||||
|                             ->where('accounts.account_key', '=', NINJA_ACCOUNT_KEY) |  | ||||||
|                             ->where('payments.is_deleted', '=', false) |  | ||||||
|                             ->groupBy('clients.id') |  | ||||||
|                             ->count(); |  | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         return json_encode($payments); |         return json_encode($data); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -109,8 +109,7 @@ class ExportController extends BaseController | |||||||
|         if ($request->input(ENTITY_CLIENT)) { |         if ($request->input(ENTITY_CLIENT)) { | ||||||
|             $data['clients'] = Client::scope() |             $data['clients'] = Client::scope() | ||||||
|                 ->with('user', 'contacts', 'country') |                 ->with('user', 'contacts', 'country') | ||||||
|                 ->withTrashed() |                 ->withArchived() | ||||||
|                 ->where('is_deleted', '=', false) |  | ||||||
|                 ->get(); |                 ->get(); | ||||||
| 
 | 
 | ||||||
|             $data['contacts'] = Contact::scope() |             $data['contacts'] = Contact::scope() | ||||||
| @ -126,33 +125,36 @@ class ExportController extends BaseController | |||||||
|         if ($request->input(ENTITY_TASK)) { |         if ($request->input(ENTITY_TASK)) { | ||||||
|             $data['tasks'] = Task::scope() |             $data['tasks'] = Task::scope() | ||||||
|                 ->with('user', 'client.contacts') |                 ->with('user', 'client.contacts') | ||||||
|                 ->withTrashed() |                 ->withArchived() | ||||||
|                 ->where('is_deleted', '=', false) |  | ||||||
|                 ->get(); |                 ->get(); | ||||||
|         } |         } | ||||||
|          |          | ||||||
|         if ($request->input(ENTITY_INVOICE)) { |         if ($request->input(ENTITY_INVOICE)) { | ||||||
|             $data['invoices'] = Invoice::scope() |             $data['invoices'] = Invoice::scope() | ||||||
|                 ->with('user', 'client.contacts', 'invoice_status') |                 ->with('user', 'client.contacts', 'invoice_status') | ||||||
|                 ->withTrashed() |                 ->withArchived() | ||||||
|                 ->where('is_deleted', '=', false) |  | ||||||
|                 ->where('is_quote', '=', false) |                 ->where('is_quote', '=', false) | ||||||
|                 ->where('is_recurring', '=', false) |                 ->where('is_recurring', '=', false) | ||||||
|                 ->get(); |                 ->get(); | ||||||
|          |          | ||||||
|             $data['quotes'] = Invoice::scope() |             $data['quotes'] = Invoice::scope() | ||||||
|                 ->with('user', 'client.contacts', 'invoice_status') |                 ->with('user', 'client.contacts', 'invoice_status') | ||||||
|                 ->withTrashed() |                 ->withArchived() | ||||||
|                 ->where('is_deleted', '=', false) |  | ||||||
|                 ->where('is_quote', '=', true) |                 ->where('is_quote', '=', true) | ||||||
|                 ->where('is_recurring', '=', false) |                 ->where('is_recurring', '=', false) | ||||||
|                 ->get(); |                 ->get(); | ||||||
|  | 
 | ||||||
|  |             $data['recurringInvoices'] = Invoice::scope() | ||||||
|  |                 ->with('user', 'client.contacts', 'invoice_status', 'frequency') | ||||||
|  |                 ->withArchived() | ||||||
|  |                 ->where('is_quote', '=', false) | ||||||
|  |                 ->where('is_recurring', '=', true) | ||||||
|  |                 ->get(); | ||||||
|         } |         } | ||||||
|          |          | ||||||
|         if ($request->input(ENTITY_PAYMENT)) { |         if ($request->input(ENTITY_PAYMENT)) { | ||||||
|             $data['payments'] = Payment::scope() |             $data['payments'] = Payment::scope() | ||||||
|                 ->withTrashed() |                 ->withArchived() | ||||||
|                 ->where('is_deleted', '=', false) |  | ||||||
|                 ->with('user', 'client.contacts', 'payment_type', 'invoice', 'account_gateway.gateway') |                 ->with('user', 'client.contacts', 'payment_type', 'invoice', 'account_gateway.gateway') | ||||||
|                 ->get(); |                 ->get(); | ||||||
|         } |         } | ||||||
| @ -161,14 +163,14 @@ class ExportController extends BaseController | |||||||
|         if ($request->input(ENTITY_VENDOR)) { |         if ($request->input(ENTITY_VENDOR)) { | ||||||
|             $data['clients'] = Vendor::scope() |             $data['clients'] = Vendor::scope() | ||||||
|                 ->with('user', 'vendorcontacts', 'country') |                 ->with('user', 'vendorcontacts', 'country') | ||||||
|                 ->withTrashed() |                 ->withArchived() | ||||||
|                 ->where('is_deleted', '=', false) |  | ||||||
|                 ->get(); |                 ->get(); | ||||||
| 
 | 
 | ||||||
|             $data['vendor_contacts'] = VendorContact::scope() |             $data['vendor_contacts'] = VendorContact::scope() | ||||||
|                 ->with('user', 'vendor.contacts') |                 ->with('user', 'vendor.contacts') | ||||||
|                 ->withTrashed() |                 ->withTrashed() | ||||||
|                 ->get(); |                 ->get(); | ||||||
|  |              | ||||||
|             /* |             /* | ||||||
|             $data['expenses'] = Credit::scope() |             $data['expenses'] = Credit::scope() | ||||||
|                 ->with('user', 'client.contacts') |                 ->with('user', 'client.contacts') | ||||||
|  | |||||||
| @ -292,7 +292,7 @@ class ReportController extends BaseController | |||||||
|                 foreach ($taxes as $tax) { |                 foreach ($taxes as $tax) { | ||||||
|                     $displayData[] = [ |                     $displayData[] = [ | ||||||
|                         $tax['name'], |                         $tax['name'], | ||||||
|                         $tax['rate'], |                         $tax['rate'] . '%', | ||||||
|                         $account->formatMoney($tax['amount'], $client), |                         $account->formatMoney($tax['amount'], $client), | ||||||
|                         $account->formatMoney($tax['paid'], $client) |                         $account->formatMoney($tax['paid'], $client) | ||||||
|                     ]; |                     ]; | ||||||
| @ -372,6 +372,8 @@ class ReportController extends BaseController | |||||||
|                             $query->where('invoice_date', '>=', $startDate) |                             $query->where('invoice_date', '>=', $startDate) | ||||||
|                                   ->where('invoice_date', '<=', $endDate) |                                   ->where('invoice_date', '<=', $endDate) | ||||||
|                                   ->where('is_deleted', '=', false) |                                   ->where('is_deleted', '=', false) | ||||||
|  |                                   ->where('is_quote', '=', false) | ||||||
|  |                                   ->where('is_recurring', '=', false) | ||||||
|                                   ->with(['payments' => function($query) { |                                   ->with(['payments' => function($query) { | ||||||
|                                         $query->withTrashed() |                                         $query->withTrashed() | ||||||
|                                               ->with('payment_type', 'account_gateway.gateway') |                                               ->with('payment_type', 'account_gateway.gateway') | ||||||
| @ -419,6 +421,8 @@ class ReportController extends BaseController | |||||||
|                         ->with(['invoices' => function($query) use ($startDate, $endDate) { |                         ->with(['invoices' => function($query) use ($startDate, $endDate) { | ||||||
|                             $query->where('invoice_date', '>=', $startDate) |                             $query->where('invoice_date', '>=', $startDate) | ||||||
|                                   ->where('invoice_date', '<=', $endDate) |                                   ->where('invoice_date', '<=', $endDate) | ||||||
|  |                                   ->where('is_quote', '=', false) | ||||||
|  |                                   ->where('is_recurring', '=', false) | ||||||
|                                   ->withArchived(); |                                   ->withArchived(); | ||||||
|                         }]); |                         }]); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -528,6 +528,8 @@ if (!defined('CONTACT_EMAIL')) { | |||||||
|     define('EMAIL_MARKUP_URL', 'https://developers.google.com/gmail/markup'); |     define('EMAIL_MARKUP_URL', 'https://developers.google.com/gmail/markup'); | ||||||
|     define('OFX_HOME_URL', 'http://www.ofxhome.com/index.php/home/directory/all'); |     define('OFX_HOME_URL', 'http://www.ofxhome.com/index.php/home/directory/all'); | ||||||
| 
 | 
 | ||||||
|  |     define('BLANK_IMAGE', 'data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='); | ||||||
|  | 
 | ||||||
|     define('COUNT_FREE_DESIGNS', 4); |     define('COUNT_FREE_DESIGNS', 4); | ||||||
|     define('COUNT_FREE_DESIGNS_SELF_HOST', 5); // include the custom design
 |     define('COUNT_FREE_DESIGNS_SELF_HOST', 5); // include the custom design
 | ||||||
|     define('PRODUCT_ONE_CLICK_INSTALL', 1); |     define('PRODUCT_ONE_CLICK_INSTALL', 1); | ||||||
|  | |||||||
| @ -439,7 +439,7 @@ class Account extends Eloquent | |||||||
|         return $height; |         return $height; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public function createInvoice($entityType, $clientId = null) |     public function createInvoice($entityType = ENTITY_INVOICE, $clientId = null) | ||||||
|     { |     { | ||||||
|         $invoice = Invoice::createNew(); |         $invoice = Invoice::createNew(); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -200,6 +200,11 @@ class Invoice extends EntityModel implements BalanceAffecting | |||||||
|         return $this->hasMany('App\Models\Invoice', 'recurring_invoice_id'); |         return $this->hasMany('App\Models\Invoice', 'recurring_invoice_id'); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     public function frequency() | ||||||
|  |     { | ||||||
|  |         return $this->belongsTo('App\Models\Frequency'); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     public function invitations() |     public function invitations() | ||||||
|     { |     { | ||||||
|         return $this->hasMany('App\Models\Invitation')->orderBy('invitations.contact_id'); |         return $this->hasMany('App\Models\Invitation')->orderBy('invitations.contact_id'); | ||||||
|  | |||||||
| @ -1,5 +1,6 @@ | |||||||
| <?php namespace App\Ninja\Presenters; | <?php namespace App\Ninja\Presenters; | ||||||
| 
 | 
 | ||||||
|  | use URL; | ||||||
| use Utils; | use Utils; | ||||||
| use Laracasts\Presenter\Presenter; | use Laracasts\Presenter\Presenter; | ||||||
| 
 | 
 | ||||||
| @ -28,6 +29,11 @@ class ClientPresenter extends Presenter { | |||||||
|         return "<span class=\"label label-{$class}\">{$text}</span>"; |         return "<span class=\"label label-{$class}\">{$text}</span>"; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     public function url() | ||||||
|  |     { | ||||||
|  |         return URL::to('/clients/' . $this->entity->public_id); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     public function link() |     public function link() | ||||||
|     { |     { | ||||||
|         return link_to('/clients/' . $this->entity->public_id, $this->entity->getDisplayName()); |         return link_to('/clients/' . $this->entity->public_id, $this->entity->getDisplayName()); | ||||||
|  | |||||||
| @ -1,5 +1,6 @@ | |||||||
| <?php namespace App\Ninja\Presenters; | <?php namespace App\Ninja\Presenters; | ||||||
| 
 | 
 | ||||||
|  | use URL; | ||||||
| use Utils; | use Utils; | ||||||
| use Laracasts\Presenter\Presenter; | use Laracasts\Presenter\Presenter; | ||||||
| 
 | 
 | ||||||
| @ -40,10 +41,16 @@ class InvoicePresenter extends Presenter { | |||||||
| 
 | 
 | ||||||
|     public function status() |     public function status() | ||||||
|     { |     { | ||||||
|  |         if ($this->entity->is_deleted) { | ||||||
|  |             return trans('texts.deleted'); | ||||||
|  |         } elseif ($this->entity->trashed()) { | ||||||
|  |             return trans('texts.archived'); | ||||||
|  |         } else { | ||||||
|             $status = $this->entity->invoice_status ? $this->entity->invoice_status->name : 'draft'; |             $status = $this->entity->invoice_status ? $this->entity->invoice_status->name : 'draft'; | ||||||
|             $status = strtolower($status); |             $status = strtolower($status); | ||||||
|             return trans("texts.status_{$status}"); |             return trans("texts.status_{$status}"); | ||||||
|         } |         } | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     public function invoice_date() |     public function invoice_date() | ||||||
|     { |     { | ||||||
| @ -55,9 +62,24 @@ class InvoicePresenter extends Presenter { | |||||||
|         return Utils::fromSqlDate($this->entity->due_date); |         return Utils::fromSqlDate($this->entity->due_date); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     public function frequency() | ||||||
|  |     { | ||||||
|  |         return $this->entity->frequency ? $this->entity->frequency->name : ''; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public function url() | ||||||
|  |     { | ||||||
|  |         return URL::to('/invoices/' . $this->entity->public_id); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     public function link() |     public function link() | ||||||
|     { |     { | ||||||
|         return link_to('/invoices/' . $this->entity->public_id, $this->entity->invoice_number); |         return link_to('/invoices/' . $this->entity->public_id, $this->entity->invoice_number); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     public function email() | ||||||
|  |     { | ||||||
|  |         $client = $this->entity->client; | ||||||
|  |         return count($client->contacts) ? $client->contacts[0]->email : ''; | ||||||
|  |     } | ||||||
| } | } | ||||||
| @ -82,47 +82,42 @@ class AccountRepository | |||||||
| 
 | 
 | ||||||
|     private function getAccountSearchData() |     private function getAccountSearchData() | ||||||
|     { |     { | ||||||
|         $clients = \DB::table('clients') |         $data = [ | ||||||
|             ->where('clients.deleted_at', '=', null) |             trans('texts.clients') => [], | ||||||
|             ->where('clients.account_id', '=', \Auth::user()->account_id) |             trans('texts.contacts') => [], | ||||||
|             ->whereRaw("clients.name <> ''") |             trans('texts.invoices') => [], | ||||||
|             ->select(\DB::raw("'clients' as type, '" . trans('texts.clients') . "' as trans_type, clients.public_id, clients.name, '' as token")); |             trans('texts.quotes') => [], | ||||||
| 
 |  | ||||||
|         $contacts = \DB::table('clients') |  | ||||||
|             ->join('contacts', 'contacts.client_id', '=', 'clients.id') |  | ||||||
|             ->where('clients.deleted_at', '=', null) |  | ||||||
|             ->where('clients.account_id', '=', \Auth::user()->account_id) |  | ||||||
|             ->whereRaw("CONCAT(contacts.first_name, contacts.last_name, contacts.email) <> ''") |  | ||||||
|             ->select(\DB::raw("'clients' as type, '" . trans('texts.contacts') . "' as trans_type, clients.public_id, CONCAT(contacts.first_name, ' ', contacts.last_name, ' ', contacts.email) as name, '' as token")); |  | ||||||
| 
 |  | ||||||
|         $invoices = \DB::table('clients') |  | ||||||
|             ->join('invoices', 'invoices.client_id', '=', 'clients.id') |  | ||||||
|             ->where('clients.account_id', '=', \Auth::user()->account_id) |  | ||||||
|             ->where('clients.deleted_at', '=', null) |  | ||||||
|             ->where('invoices.deleted_at', '=', null) |  | ||||||
|             ->select(\DB::raw("'invoices' as type, '" . trans('texts.invoices') . "' as trans_type, invoices.public_id, CONCAT(invoices.invoice_number, ': ', clients.name) as name, invoices.invoice_number as token")); |  | ||||||
| 
 |  | ||||||
|         $data = []; |  | ||||||
| 
 |  | ||||||
|         foreach ($clients->union($contacts)->union($invoices)->get() as $row) { |  | ||||||
|             $type = $row->trans_type; |  | ||||||
| 
 |  | ||||||
|             if (!isset($data[$type])) { |  | ||||||
|                 $data[$type] = []; |  | ||||||
|             } |  | ||||||
| 
 |  | ||||||
|             $tokens = explode(' ', $row->name); |  | ||||||
|             $tokens[] = $type; |  | ||||||
| 
 |  | ||||||
|             if ($type == 'Invoices') { |  | ||||||
|                 $tokens[] = intVal($row->token).''; |  | ||||||
|             } |  | ||||||
| 
 |  | ||||||
|             $data[$type][] = [ |  | ||||||
|                 'value' => $row->name, |  | ||||||
|                 'tokens' => $tokens, |  | ||||||
|                 'url' => URL::to("/{$row->type}/{$row->public_id}"), |  | ||||||
|         ]; |         ]; | ||||||
|  | 
 | ||||||
|  |         $clients = Client::scope() | ||||||
|  |                     ->with('contacts', 'invoices') | ||||||
|  |                     ->get(); | ||||||
|  | 
 | ||||||
|  |         foreach ($clients as $client) { | ||||||
|  |             if ($client->name) { | ||||||
|  |                 $data[trans('texts.clients')][] = [ | ||||||
|  |                     'value' => $client->name, | ||||||
|  |                     'tokens' => explode(' ', $client->name), | ||||||
|  |                     'url' => $client->present()->url, | ||||||
|  |                 ]; | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |             foreach ($client->contacts as $contact) { | ||||||
|  |                 $data[trans('texts.contacts')][] = [ | ||||||
|  |                     'value' => $contact->getDisplayName(), | ||||||
|  |                     'tokens' => explode(' ', $contact->getFullName() . ' ' . $contact->email), | ||||||
|  |                     'url' => $client->present()->url, | ||||||
|  |                 ]; | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |             foreach ($client->invoices as $invoice) { | ||||||
|  |                 $entityType = $invoice->getEntityType(); | ||||||
|  |                 $data[trans("texts.{$entityType}s")][] = [ | ||||||
|  |                     'value' => $invoice->getDisplayName() . ': ' . $client->getDisplayName(), | ||||||
|  |                     'tokens' => explode(' ', $invoice->invoice_number . ' ' . intval($invoice->invoice_number) . ' ' . $client->getDisplayName()), | ||||||
|  |                     'url' => $invoice->present()->url, | ||||||
|  |                 ]; | ||||||
|  |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         return $data; |         return $data; | ||||||
|  | |||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										211
									
								
								public/css/built.css
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										211
									
								
								public/css/built.css
									
									
									
									
										vendored
									
									
								
							| @ -2138,217 +2138,6 @@ See http://bgrins.github.io/spectrum/themes/ for instructions. | |||||||
|     border-radius: 6px; |     border-radius: 6px; | ||||||
|     line-height: 1.33; |     line-height: 1.33; | ||||||
| } | } | ||||||
| /* Preload images */ |  | ||||||
| body:after { |  | ||||||
|   content: url(../images/lightbox/close.png) url(../images/lightbox/loading.gif) url(../images/lightbox/prev.png) url(../images/lightbox/next.png); |  | ||||||
|   display: none; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lightboxOverlay { |  | ||||||
|   position: absolute; |  | ||||||
|   top: 0; |  | ||||||
|   left: 0; |  | ||||||
|   z-index: 9999; |  | ||||||
|   background-color: black; |  | ||||||
|   filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); |  | ||||||
|   opacity: 0.8; |  | ||||||
|   display: none; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lightbox { |  | ||||||
|   position: absolute; |  | ||||||
|   left: 0; |  | ||||||
|   width: 100%; |  | ||||||
|   z-index: 10000; |  | ||||||
|   text-align: center; |  | ||||||
|   line-height: 0; |  | ||||||
|   font-weight: normal; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lightbox .lb-image { |  | ||||||
|   display: block; |  | ||||||
|   height: auto; |  | ||||||
|   max-width: inherit; |  | ||||||
|   -webkit-border-radius: 3px; |  | ||||||
|   -moz-border-radius: 3px; |  | ||||||
|   -ms-border-radius: 3px; |  | ||||||
|   -o-border-radius: 3px; |  | ||||||
|   border-radius: 3px; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lightbox a img { |  | ||||||
|   border: none; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-outerContainer { |  | ||||||
|   position: relative; |  | ||||||
|   background-color: white; |  | ||||||
|   *zoom: 1; |  | ||||||
|   width: 250px; |  | ||||||
|   height: 250px; |  | ||||||
|   margin: 0 auto; |  | ||||||
|   -webkit-border-radius: 4px; |  | ||||||
|   -moz-border-radius: 4px; |  | ||||||
|   -ms-border-radius: 4px; |  | ||||||
|   -o-border-radius: 4px; |  | ||||||
|   border-radius: 4px; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-outerContainer:after { |  | ||||||
|   content: ""; |  | ||||||
|   display: table; |  | ||||||
|   clear: both; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-container { |  | ||||||
|   padding: 4px; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-loader { |  | ||||||
|   position: absolute; |  | ||||||
|   top: 43%; |  | ||||||
|   left: 0; |  | ||||||
|   height: 25%; |  | ||||||
|   width: 100%; |  | ||||||
|   text-align: center; |  | ||||||
|   line-height: 0; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-cancel { |  | ||||||
|   display: block; |  | ||||||
|   width: 32px; |  | ||||||
|   height: 32px; |  | ||||||
|   margin: 0 auto; |  | ||||||
|   background: url(../images/lightbox/loading.gif) no-repeat; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-nav { |  | ||||||
|   position: absolute; |  | ||||||
|   top: 0; |  | ||||||
|   left: 0; |  | ||||||
|   height: 100%; |  | ||||||
|   width: 100%; |  | ||||||
|   z-index: 10; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-container > .nav { |  | ||||||
|   left: 0; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-nav a { |  | ||||||
|   outline: none; |  | ||||||
|   background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-prev, .lb-next { |  | ||||||
|   height: 100%; |  | ||||||
|   cursor: pointer; |  | ||||||
|   display: block; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-nav a.lb-prev { |  | ||||||
|   width: 34%; |  | ||||||
|   left: 0; |  | ||||||
|   float: left; |  | ||||||
|   background: url(../images/lightbox/prev.png) left 48% no-repeat; |  | ||||||
|   filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); |  | ||||||
|   opacity: 0; |  | ||||||
|   -webkit-transition: opacity 0.6s; |  | ||||||
|   -moz-transition: opacity 0.6s; |  | ||||||
|   -o-transition: opacity 0.6s; |  | ||||||
|   transition: opacity 0.6s; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-nav a.lb-prev:hover { |  | ||||||
|   filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); |  | ||||||
|   opacity: 1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-nav a.lb-next { |  | ||||||
|   width: 64%; |  | ||||||
|   right: 0; |  | ||||||
|   float: right; |  | ||||||
|   background: url(../images/lightbox/next.png) right 48% no-repeat; |  | ||||||
|   filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); |  | ||||||
|   opacity: 0; |  | ||||||
|   -webkit-transition: opacity 0.6s; |  | ||||||
|   -moz-transition: opacity 0.6s; |  | ||||||
|   -o-transition: opacity 0.6s; |  | ||||||
|   transition: opacity 0.6s; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-nav a.lb-next:hover { |  | ||||||
|   filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); |  | ||||||
|   opacity: 1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-dataContainer { |  | ||||||
|   margin: 0 auto; |  | ||||||
|   padding-top: 5px; |  | ||||||
|   *zoom: 1; |  | ||||||
|   width: 100%; |  | ||||||
|   -moz-border-radius-bottomleft: 4px; |  | ||||||
|   -webkit-border-bottom-left-radius: 4px; |  | ||||||
|   border-bottom-left-radius: 4px; |  | ||||||
|   -moz-border-radius-bottomright: 4px; |  | ||||||
|   -webkit-border-bottom-right-radius: 4px; |  | ||||||
|   border-bottom-right-radius: 4px; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-dataContainer:after { |  | ||||||
|   content: ""; |  | ||||||
|   display: table; |  | ||||||
|   clear: both; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-data { |  | ||||||
|   padding: 0 4px; |  | ||||||
|   color: #ccc; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-data .lb-details { |  | ||||||
|   width: 85%; |  | ||||||
|   float: left; |  | ||||||
|   text-align: left; |  | ||||||
|   line-height: 1.1em; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-data .lb-caption { |  | ||||||
|   font-size: 13px; |  | ||||||
|   font-weight: bold; |  | ||||||
|   line-height: 1em; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-data .lb-number { |  | ||||||
|   display: block; |  | ||||||
|   clear: left; |  | ||||||
|   padding-bottom: 1em; |  | ||||||
|   font-size: 12px; |  | ||||||
|   color: #999999; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-data .lb-close { |  | ||||||
|   display: block; |  | ||||||
|   float: right; |  | ||||||
|   width: 30px; |  | ||||||
|   height: 30px; |  | ||||||
|   background: url(../images/lightbox/close.png) top right no-repeat; |  | ||||||
|   text-align: right; |  | ||||||
|   outline: none; |  | ||||||
|   filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70); |  | ||||||
|   opacity: 0.7; |  | ||||||
|   -webkit-transition: opacity 0.2s; |  | ||||||
|   -moz-transition: opacity 0.2s; |  | ||||||
|   -o-transition: opacity 0.2s; |  | ||||||
|   transition: opacity 0.2s; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .lb-data .lb-close:hover { |  | ||||||
|   cursor: pointer; |  | ||||||
|   filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); |  | ||||||
|   opacity: 1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| body { background: #f8f8f8 !important; | body { background: #f8f8f8 !important; | ||||||
|     font-family: 'Roboto', sans-serif; |     font-family: 'Roboto', sans-serif; | ||||||
|     font-size: 15px; |     font-size: 15px; | ||||||
|  | |||||||
| @ -209,18 +209,28 @@ NINJA.decodeJavascript = function(invoice, javascript) | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // search/replace values 
 |     // search/replace values 
 | ||||||
|     var regExp = new RegExp('"\\$[\\\w\\\.]*?Value"', 'g'); |     var regExp = new RegExp('"\\$[a-z][\\\w\\\.]*?[Value]?"', 'g'); | ||||||
|     var matches = javascript.match(regExp);     |     var matches = javascript.match(regExp);     | ||||||
| 
 | 
 | ||||||
|     if (matches) { |     if (matches) { | ||||||
|         for (var i=0; i<matches.length; i++) { |         for (var i=0; i<matches.length; i++) { | ||||||
|             var match = matches[i]; |             var match = matches[i]; | ||||||
|  | 
 | ||||||
|  |             // reserved words
 | ||||||
|  |             if (['"$none"', '"$firstAndLast"', '"$notFirstAndLastColumn"', '"$notFirst"', '"$amount"', '"$primaryColor"', '"$secondaryColor"'].indexOf(match) >= 0) { | ||||||
|  |                 continue; | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |             // legacy style had 'Value' at the end
 | ||||||
|  |             if (endsWith(match, 'Value"')) { | ||||||
|                 field = match.substring(2, match.indexOf('Value')); |                 field = match.substring(2, match.indexOf('Value')); | ||||||
|  |             } else { | ||||||
|  |                 field = match.substring(2, match.length - 1); | ||||||
|  |             }             | ||||||
|             field = toSnakeCase(field); |             field = toSnakeCase(field); | ||||||
| 
 | 
 | ||||||
|             var value = getDescendantProp(invoice, field) || ' '; |             var value = getDescendantProp(invoice, field) || ' '; | ||||||
|             value = doubleDollarSign(value); |             value = doubleDollarSign(value); | ||||||
| 
 |  | ||||||
|             javascript = javascript.replace(match, '"'+value+'"'); |             javascript = javascript.replace(match, '"'+value+'"'); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -961,6 +961,11 @@ function truncate(str, length) { | |||||||
|   return (str && str.length > length) ? (str.substr(0, length-1) + '...') : str; |   return (str && str.length > length) ? (str.substr(0, length-1) + '...') : str; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | // http://stackoverflow.com/questions/280634/endswith-in-javascript
 | ||||||
|  | function endsWith(str, suffix) { | ||||||
|  |     return str.indexOf(suffix, str.length - suffix.length) !== -1; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| // http://codeaid.net/javascript/convert-seconds-to-hours-minutes-and-seconds-%28javascript%29
 | // http://codeaid.net/javascript/convert-seconds-to-hours-minutes-and-seconds-%28javascript%29
 | ||||||
| function secondsToTime(secs) | function secondsToTime(secs) | ||||||
| { | { | ||||||
| @ -993,6 +998,11 @@ function toSnakeCase(str) { | |||||||
|     return str.replace(/([A-Z])/g, function($1){return "_"+$1.toLowerCase();}); |     return str.replace(/([A-Z])/g, function($1){return "_"+$1.toLowerCase();}); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | // https://coderwall.com/p/iprsng/convert-snake-case-to-camelcase
 | ||||||
|  | function snakeToCamel(s){ | ||||||
|  |     return s.replace(/_([a-z])/g, function (g) { return g[1].toUpperCase(); }); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| function getDescendantProp(obj, desc) { | function getDescendantProp(obj, desc) { | ||||||
|     var arr = desc.split("."); |     var arr = desc.split("."); | ||||||
|     while(arr.length && (obj = obj[arr.shift()])); |     while(arr.length && (obj = obj[arr.shift()])); | ||||||
| @ -1001,6 +1011,7 @@ function getDescendantProp(obj, desc) { | |||||||
| 
 | 
 | ||||||
| function doubleDollarSign(str) { | function doubleDollarSign(str) { | ||||||
|     if (!str) return ''; |     if (!str) return ''; | ||||||
|  |     if (!str.replace) return str; | ||||||
|     return str.replace(/\$/g, '\$\$\$'); |     return str.replace(/\$/g, '\$\$\$'); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -1025,3 +1036,35 @@ function actionListHandler() { | |||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | function loadImages(selector) { | ||||||
|  |     $(selector + ' img').each(function(index, item) { | ||||||
|  |         var src = $(item).attr('data-src'); | ||||||
|  |         $(item).attr('src', src); | ||||||
|  |         $(item).attr('data-src', src); | ||||||
|  |     }); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // http://stackoverflow.com/questions/4810841/how-can-i-pretty-print-json-using-javascript
 | ||||||
|  | function prettyJson(json) { | ||||||
|  |     if (typeof json != 'string') { | ||||||
|  |          json = JSON.stringify(json, undefined, 2); | ||||||
|  |     } | ||||||
|  |     json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>'); | ||||||
|  |     return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) { | ||||||
|  |         var cls = 'number'; | ||||||
|  |         if (/^"/.test(match)) { | ||||||
|  |             if (/:$/.test(match)) { | ||||||
|  |                 cls = 'key'; | ||||||
|  |             } else { | ||||||
|  |                 cls = 'string'; | ||||||
|  |             } | ||||||
|  |         } else if (/true|false/.test(match)) { | ||||||
|  |             cls = 'boolean'; | ||||||
|  |         } else if (/null/.test(match)) { | ||||||
|  |             cls = 'null'; | ||||||
|  |         } | ||||||
|  |         match = snakeToCamel(match); | ||||||
|  |         return '<span class="' + cls + '">' + match + '</span>'; | ||||||
|  |     }); | ||||||
|  | } | ||||||
| @ -747,8 +747,7 @@ return array( | |||||||
|     'primary_user' => 'Primær bruger', |     'primary_user' => 'Primær bruger', | ||||||
|     'help' => 'Hjælp', |     'help' => 'Hjælp', | ||||||
|     'customize_help' => '<p>Vi bruger <a href="http://pdfmake.org/" target="_blank">pdfmake</a> til at definere faktura design felter. pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">legeplads</a> giver en god mulighed for at se biblioteket i aktion.</p> |     'customize_help' => '<p>Vi bruger <a href="http://pdfmake.org/" target="_blank">pdfmake</a> til at definere faktura design felter. pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">legeplads</a> giver en god mulighed for at se biblioteket i aktion.</p> | ||||||
|                 <p>Du kan tilgå alle faktura felter ved at tilføje <code>Value</code> til slutningen. For eksempel viser <code>$invoiceNumberValue</code> fakturanummeret.</p> |                 <p>For at tilgå under indstillingerne ved hjælp af dot notation. For eksempel kan man for at vise klient navnet bruge <code>$client.name</code>.</p> | ||||||
|                 <p>For at tilgå under indstillingerne ved hjælp af dot notation. For eksempel kan man for at vise klient navnet bruge <code>$client.nameValue</code>.</p> |  | ||||||
|                 <p>Hvis du mangler svar på nogen spørgsmål så post et spørgsmål i vores <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', |                 <p>Hvis du mangler svar på nogen spørgsmål så post et spørgsmål i vores <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', | ||||||
| 
 | 
 | ||||||
|     'invoice_due_date' => 'Due Date', |     'invoice_due_date' => 'Due Date', | ||||||
|  | |||||||
| @ -747,8 +747,7 @@ return array( | |||||||
|     'primary_user' => 'Primärer Benutzer', |     'primary_user' => 'Primärer Benutzer', | ||||||
|     'help' => 'Hilfe', |     'help' => 'Hilfe', | ||||||
|     'customize_help' => '<p>Wir benutzen zur deklarativen Definition der Rechnungsdesigns <a href="http://pdfmake.org/" target="_blank">pdfmake</a>. Der pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> bietet Gelegenheit die Bibliothek in Aktion zu sehen.</p> |     'customize_help' => '<p>Wir benutzen zur deklarativen Definition der Rechnungsdesigns <a href="http://pdfmake.org/" target="_blank">pdfmake</a>. Der pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> bietet Gelegenheit die Bibliothek in Aktion zu sehen.</p> | ||||||
|                         <p>Man kann jedes Rechnungsfeld nutzen, in dem man <code>Value</code> hinten anhängt. Zum Beispiel zeigt <code>$invoiceNumberValue</code> die Rechnungsnummer.</p> |                         <p>Mit der <i>dot notation</i> kann auf Kind-Eigenschaften zugegriffen werden. Für den Kundennamen kann man zum Beispiel <code>$client.name</code> benutzen.</p> | ||||||
|                         <p>Mit der <i>dot notation</i> kann auf Kind-Eigenschaften zugegriffen werden. Für den Kundennamen kann man zum Beispiel <code>$client.nameValue</code> benutzen.</p> |  | ||||||
|                         <p>Wenn du Hilfe brauchst schreibe uns gern im <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">Support Forum</a> (Englisch).</p>', |                         <p>Wenn du Hilfe brauchst schreibe uns gern im <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">Support Forum</a> (Englisch).</p>', | ||||||
| 
 | 
 | ||||||
|     'invoice_due_date' => 'Fällig am', |     'invoice_due_date' => 'Fällig am', | ||||||
|  | |||||||
| @ -81,7 +81,7 @@ $LANG = array( | |||||||
|     'company_details' => 'Company Details', |     'company_details' => 'Company Details', | ||||||
|     'online_payments' => 'Online Payments', |     'online_payments' => 'Online Payments', | ||||||
|     'notifications' => 'Email Notifications', |     'notifications' => 'Email Notifications', | ||||||
|     'import_export' => 'Import/Export/Cancel', |     'import_export' => 'Import | Export | Cancel', | ||||||
|     'done' => 'Done', |     'done' => 'Done', | ||||||
|     'save' => 'Save', |     'save' => 'Save', | ||||||
|     'create' => 'Create', |     'create' => 'Create', | ||||||
| @ -655,8 +655,7 @@ $LANG = array( | |||||||
|     'primary_user' => 'Primary User', |     'primary_user' => 'Primary User', | ||||||
|     'help' => 'Help', |     'help' => 'Help', | ||||||
|     'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p> |     'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p> | ||||||
|                         <p>You can access any invoice field by adding <code>Value</code> to the end. For example <code>$invoiceNumberValue</code> displays the invoice number.</p> |                         <p>To access a child property using dot notation. For example to show the client name you could use <code>$client.name</code>.</p> | ||||||
|                         <p>To access a child property using dot notation. For example to show the client name you could use <code>$client.nameValue</code>.</p> |  | ||||||
|                         <p>If you need help figuring something out post a question to our <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', |                         <p>If you need help figuring something out post a question to our <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', | ||||||
|     'invoice_due_date' => 'Due Date', |     'invoice_due_date' => 'Due Date', | ||||||
|     'quote_due_date' => 'Valid Until', |     'quote_due_date' => 'Valid Until', | ||||||
|  | |||||||
| @ -725,8 +725,7 @@ return array( | |||||||
|     'primary_user' => 'Usuario Primario', |     'primary_user' => 'Usuario Primario', | ||||||
|     'help' => 'Ayuda', |     'help' => 'Ayuda', | ||||||
|     'customize_help' => '<p>Nosotros usamos <a href="http://pdfmake.org/" target="_blank">pdfmake</a> para definir los diseños de las facturas de manera declarativa. El <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> de pdfmake es una excelente manera de ver a la librería en acción.</p> |     'customize_help' => '<p>Nosotros usamos <a href="http://pdfmake.org/" target="_blank">pdfmake</a> para definir los diseños de las facturas de manera declarativa. El <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> de pdfmake es una excelente manera de ver a la librería en acción.</p> | ||||||
|     <p>Puedes acceder cualquier campo de una factura agregando <code>Value</code> al final. Por ejemplo, <code>$invoiceNumberValue</code> muestra el número de factura.</p> |     <p>Para acceder a una propiedad hija usando notación de punto.Por ejemplo, para mostrar el nombre de un cliente se puede usar <code>$client.name</code>.</p> | ||||||
|     <p>Para acceder a una propiedad hija usando notación de punto.Por ejemplo, para mostrar el nombre de un cliente se puede usar <code>$client.nameValue</code>.</p> |  | ||||||
|     <p>Si necesitas ayuda entendiendo algo puede preguntar en nuestro <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">foro de soporte</a>.</p>', |     <p>Si necesitas ayuda entendiendo algo puede preguntar en nuestro <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">foro de soporte</a>.</p>', | ||||||
| 
 | 
 | ||||||
|     'invoice_due_date' => 'Fecha de Vencimiento', |     'invoice_due_date' => 'Fecha de Vencimiento', | ||||||
|  | |||||||
| @ -746,8 +746,7 @@ return array( | |||||||
|     'primary_user' => 'Usuario Principal', |     'primary_user' => 'Usuario Principal', | ||||||
|     'help' => 'Ayuda', |     'help' => 'Ayuda', | ||||||
|     'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p> |     'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p> | ||||||
|                 <p>You can access any invoice field by adding <code>Value</code> to the end. For example <code>$invoiceNumberValue</code> displays the invoice number.</p> |                 <p>To access a child property using dot notation. For example to show the client name you could use <code>$client.name</code>.</p> | ||||||
|                 <p>To access a child property using dot notation. For example to show the client name you could use <code>$client.nameValue</code>.</p> |  | ||||||
|                 <p>If you need help figuring something out post a question to our <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', |                 <p>If you need help figuring something out post a question to our <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', | ||||||
| 
 | 
 | ||||||
|     'invoice_due_date' => 'Fecha de Pago', |     'invoice_due_date' => 'Fecha de Pago', | ||||||
|  | |||||||
| @ -738,8 +738,7 @@ return array( | |||||||
|     'primary_user' => 'Utilisateur principal', |     'primary_user' => 'Utilisateur principal', | ||||||
|     'help' => 'Aide', |     'help' => 'Aide', | ||||||
|     'customize_help' => '<p>Nous utilisons <a href="http://pdfmake.org/" target="_blank">pdfmake</a> pour définir le design des factures. Le <a href="http://pdfmake.org/playground.html" target="_blank">bac à sable<a> de pdfmake est une bonne façon de voir cette bibliothèque en action.</p> |     'customize_help' => '<p>Nous utilisons <a href="http://pdfmake.org/" target="_blank">pdfmake</a> pour définir le design des factures. Le <a href="http://pdfmake.org/playground.html" target="_blank">bac à sable<a> de pdfmake est une bonne façon de voir cette bibliothèque en action.</p> | ||||||
|                         <p>Vous pouvez accéder à n\'importe quel champ de facture en ajoutant <code>Value</code> à la fin. Par exemple <code>$invoiceNumberValue</code> affiche le numéro de facture.</p> |                         <p>Pour accéder à une propriété héritée avec la  notation par point. Par exemple pour montrer le nom du client vous pouvez utiliser <code>$client.name</code>.</p> | ||||||
|                         <p>Pour accéder à une propriété héritée avec la  notation par point. Par exemple pour montrer le nom du client vous pouvez utiliser <code>$client.nameValue</code>.</p> |  | ||||||
|                         <p>Si vous avez besoin d\'aide pour comprendre quelque chose envoyez une question à notre <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">forum de support</a>.</p>', |                         <p>Si vous avez besoin d\'aide pour comprendre quelque chose envoyez une question à notre <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">forum de support</a>.</p>', | ||||||
| 
 | 
 | ||||||
|     'invoice_due_date' => 'Date limite', |     'invoice_due_date' => 'Date limite', | ||||||
|  | |||||||
| @ -741,8 +741,7 @@ return array( | |||||||
|     'primary_user' => 'Utilisateur principal', |     'primary_user' => 'Utilisateur principal', | ||||||
|     'help' => 'Aide', |     'help' => 'Aide', | ||||||
|     'customize_help' => '<p>Nous utilisons <a href="http://pdfmake.org/" target="_blank">pdfmake</a> pour définir le design des factures de façon déclarative. L\'<a href="http://pdfmake.org/playground.html" target="_blank">environnement</a> pdfmake permet de voir la librairie en action.</p> |     'customize_help' => '<p>Nous utilisons <a href="http://pdfmake.org/" target="_blank">pdfmake</a> pour définir le design des factures de façon déclarative. L\'<a href="http://pdfmake.org/playground.html" target="_blank">environnement</a> pdfmake permet de voir la librairie en action.</p> | ||||||
|     <p>Vous pouvez accéder à n\'importe quel champ de facture en ajoutant <code>Value</code> à la fin. Par exemple <code>$invoiceNumberValue</code> affiche le numéro de facture.</p> |     <p>Pour accéder à une propriété enfant en utilisant la notation par point. Par exemple <code>$client.name</code>affiche le nom du client.</p> | ||||||
|     <p>Pour accéder à une propriété enfant en utilisant la notation par point. Par exemple <code>$client.nameValue</code>affiche le nom du client.</p> |  | ||||||
|     <p>Si vous avez besoin d\'aide à cet effet, n\'hésitez pas à publier une question sur notre <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">forum d\'aide (en anglais)</a>.</p>', |     <p>Si vous avez besoin d\'aide à cet effet, n\'hésitez pas à publier une question sur notre <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">forum d\'aide (en anglais)</a>.</p>', | ||||||
| 
 | 
 | ||||||
|     'invoice_due_date' => 'Échéance', |     'invoice_due_date' => 'Échéance', | ||||||
|  | |||||||
| @ -743,8 +743,7 @@ return array( | |||||||
|     'primary_user' => 'Primary User', |     'primary_user' => 'Primary User', | ||||||
|     'help' => 'Help', |     'help' => 'Help', | ||||||
|     'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p> |     'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p> | ||||||
|                         <p>You can access any invoice field by adding <code>Value</code> to the end. For example <code>$invoiceNumberValue</code> displays the invoice number.</p> |                         <p>To access a child property using dot notation. For example to show the client name you could use <code>$client.name</code>.</p> | ||||||
|                         <p>To access a child property using dot notation. For example to show the client name you could use <code>$client.nameValue</code>.</p> |  | ||||||
|                         <p>If you need help figuring something out post a question to our <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', |                         <p>If you need help figuring something out post a question to our <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', | ||||||
| 
 | 
 | ||||||
|     'invoice_due_date' => 'Due Date', |     'invoice_due_date' => 'Due Date', | ||||||
|  | |||||||
| @ -750,8 +750,7 @@ return array( | |||||||
|     'primary_user' => 'Primary User', |     'primary_user' => 'Primary User', | ||||||
|     'help' => 'Help', |     'help' => 'Help', | ||||||
|     'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p> |     'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p> | ||||||
|                         <p>You can access any invoice field by adding <code>Value</code> to the end. For example <code>$invoiceNumberValue</code> displays the invoice number.</p> |                         <p>To access a child property using dot notation. For example to show the client name you could use <code>$client.name</code>.</p> | ||||||
|                         <p>To access a child property using dot notation. For example to show the client name you could use <code>$client.nameValue</code>.</p> |  | ||||||
|                         <p>If you need help figuring something out post a question to our <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', |                         <p>If you need help figuring something out post a question to our <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', | ||||||
| 
 | 
 | ||||||
|     'invoice_due_date' => 'Due Date', |     'invoice_due_date' => 'Due Date', | ||||||
|  | |||||||
| @ -746,8 +746,7 @@ return array( | |||||||
|     'primary_user' => 'Hovedbruker', |     'primary_user' => 'Hovedbruker', | ||||||
|     'help' => 'Hjelp', |     'help' => 'Hjelp', | ||||||
|     'customize_help' => '<p>Vi bruker <a href="http://pdfmake.org/" target="_blank">pdfmake</a> for å definere faktura designene deklarativt. Pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> gir en flott måte å se biblioteket i aksjon.</p> |     'customize_help' => '<p>Vi bruker <a href="http://pdfmake.org/" target="_blank">pdfmake</a> for å definere faktura designene deklarativt. Pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> gir en flott måte å se biblioteket i aksjon.</p> | ||||||
|                         <p>Du kan få tilgang til hvilket som helst faktura felt ved å legge til <code>Value</code> i slutten. For eksempel <code>$invoiceNumberValue</code> viser faktura nummeret.</p> |                         <p>For å få tilgang til et underelementet ved bruk av prikk notasjon. For eksempel for å vise klientens navn, kan du bruke <code>$client.name</code>.</p> | ||||||
|                         <p>For å få tilgang til et underelementet ved bruk av prikk notasjon. For eksempel for å vise klientens navn, kan du bruke <code>$client.nameValue</code>.</p> |  | ||||||
|                         <p>Om du trenger hjelp til å finne ut noe, poster et spørsmål til vårt <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">brukerforum</a>.</p>', |                         <p>Om du trenger hjelp til å finne ut noe, poster et spørsmål til vårt <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">brukerforum</a>.</p>', | ||||||
| 
 | 
 | ||||||
|     'invoice_due_date' => 'Tidsfrist', |     'invoice_due_date' => 'Tidsfrist', | ||||||
|  | |||||||
| @ -741,8 +741,7 @@ return array( | |||||||
|     'primary_user' => 'Primaire gebruiker', |     'primary_user' => 'Primaire gebruiker', | ||||||
|     'help' => 'Help', |     'help' => 'Help', | ||||||
|     'customize_help' => '<p>We gebruiken <a href="http://pdfmake.org/" target="_blank">pdfmake</a> om de factuur ontwerpen declaratief te definieren. De pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> is een interessante manier om de library in actie te zien.</p> |     'customize_help' => '<p>We gebruiken <a href="http://pdfmake.org/" target="_blank">pdfmake</a> om de factuur ontwerpen declaratief te definieren. De pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> is een interessante manier om de library in actie te zien.</p> | ||||||
|                         <p>Je kan elk factuur veld gebruiken door <code>Veld</code> toe te voegen op het einde. Bijvoorbeeld <code>$invoiceNumberValue</code> toont de factuur nummer.</p> |                         <p>Gebruik dot notatie om een "kind eigenschap" te gebruiken. Bijvoorbeeld voor de klant naam te tonen gebruik je <code>$client.name</code>.</p> | ||||||
|                         <p>Gebruik dot notatie om een "kind eigenschap" te gebruiken. Bijvoorbeeld voor de klant naam te tonen gebruik je <code>$client.nameValue</code>.</p> |  | ||||||
|                         <p>Als je ergens hulp bij nodig hebt, post dan een vraag op ons <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', |                         <p>Als je ergens hulp bij nodig hebt, post dan een vraag op ons <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', | ||||||
| 
 | 
 | ||||||
|     'invoice_due_date' => 'Vervaldatum', |     'invoice_due_date' => 'Vervaldatum', | ||||||
|  | |||||||
| @ -739,8 +739,7 @@ return array( | |||||||
|     'primary_user' => 'Usuário Principal', |     'primary_user' => 'Usuário Principal', | ||||||
|     'help' => 'Ajuda', |     'help' => 'Ajuda', | ||||||
|     'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p> |     'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p> | ||||||
|       <p>You can access any invoice field by adding <code>Value</code> to the end. For example <code>$invoiceNumberValue</code> displays the invoice number.</p> |       <p>To access a child property using dot notation. For example to show the client name you could use <code>$client.name</code>.</p> | ||||||
|       <p>To access a child property using dot notation. For example to show the client name you could use <code>$client.nameValue</code>.</p> |  | ||||||
|       <p>If you need help figuring something out post a question to our <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', |       <p>If you need help figuring something out post a question to our <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', | ||||||
| 
 | 
 | ||||||
|     'invoice_due_date' => 'Data de vencimento', |     'invoice_due_date' => 'Data de vencimento', | ||||||
|  | |||||||
| @ -745,8 +745,7 @@ return array( | |||||||
|     'primary_user' => 'Primary User', |     'primary_user' => 'Primary User', | ||||||
|     'help' => 'Help', |     'help' => 'Help', | ||||||
|     'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p> |     'customize_help' => '<p>We use <a href="http://pdfmake.org/" target="_blank">pdfmake</a> to define the invoice designs declaratively. The pdfmake <a href="http://pdfmake.org/playground.html" target="_blank">playground</a> provide\'s a great way to see the library in action.</p> | ||||||
|         <p>You can access any invoice field by adding <code>Value</code> to the end. For example <code>$invoiceNumberValue</code> displays the invoice number.</p> |         <p>To access a child property using dot notation. For example to show the client name you could use <code>$client.name</code>.</p> | ||||||
|         <p>To access a child property using dot notation. For example to show the client name you could use <code>$client.nameValue</code>.</p> |  | ||||||
|         <p>If you need help figuring something out post a question to our <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', |         <p>If you need help figuring something out post a question to our <a href="https://www.invoiceninja.com/forums/forum/support/" target="_blank">support forum</a>.</p>', | ||||||
| 
 | 
 | ||||||
|     'invoice_due_date' => 'Due Date', |     'invoice_due_date' => 'Due Date', | ||||||
|  | |||||||
| @ -22,6 +22,14 @@ | |||||||
|             background: #FFFFFF !important;        
 |             background: #FFFFFF !important;        
 | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         /* http://stackoverflow.com/questions/4810841/how-can-i-pretty-print-json-using-javascript */ | ||||||
|  |         pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; }
 | ||||||
|  |         .string { color: green; } | ||||||
|  |         .number { color: red; } | ||||||
|  |         .boolean { color: blue; } | ||||||
|  |         .null { color: gray; } | ||||||
|  |         .key { color: black; } | ||||||
|  | 
 | ||||||
|       </style> |       </style> | ||||||
| 
 | 
 | ||||||
| @stop | @stop | ||||||
| @ -142,6 +150,12 @@ | |||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|         refreshPDF(true); |         refreshPDF(true); | ||||||
|  | 
 | ||||||
|  |         @if (isset($sampleInvoice) && $sampleInvoice) | ||||||
|  |             var sample = {!! $sampleInvoice->toJSON() !!} | ||||||
|  |             console.log(sample); | ||||||
|  |             $('#sampleData').show().html(prettyJson(sample)); | ||||||
|  |         @endif | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|   </script>  |   </script>  | ||||||
| @ -206,6 +220,8 @@ | |||||||
| 
 | 
 | ||||||
|           <div class="panel-body" style="background-color: #fff"> |           <div class="panel-body" style="background-color: #fff"> | ||||||
|             {!! trans('texts.customize_help') !!} |             {!! trans('texts.customize_help') !!} | ||||||
|  | 
 | ||||||
|  |             <pre id="sampleData" style="display:none;height:200px;padding-top:16px;"></pre> | ||||||
|           </div> |           </div> | ||||||
| 
 | 
 | ||||||
|          <div class="modal-footer" style="margin-top: 0px"> |          <div class="modal-footer" style="margin-top: 0px"> | ||||||
|  | |||||||
| @ -8,6 +8,8 @@ | |||||||
|         <script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script> |         <script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script> | ||||||
|     @endforeach |     @endforeach | ||||||
|     <script src="{{ asset('pdf.built.js') }}" type="text/javascript"></script> |     <script src="{{ asset('pdf.built.js') }}" type="text/javascript"></script> | ||||||
|  |     <script src="{{ asset('js/lightbox.min.js') }}" type="text/javascript"></script> | ||||||
|  |     <link href="{{ asset('css/lightbox.css') }}" rel="stylesheet" type="text/css"/> | ||||||
| 
 | 
 | ||||||
| @stop | @stop | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -35,6 +35,11 @@ | |||||||
|         @include('export.invoices', ['entityType' => ENTITY_QUOTE]) |         @include('export.invoices', ['entityType' => ENTITY_QUOTE]) | ||||||
|     @endif |     @endif | ||||||
| 
 | 
 | ||||||
|  |     @if (isset($recurringInvoices) && $recurringInvoices && count($recurringInvoices)) | ||||||
|  |         <tr><td>{{ strtoupper(trans('texts.recurring_invoices')) }}</td></tr> | ||||||
|  |         @include('export.recurring_invoices', ['entityType' => ENTITY_RECURRING_INVOICE]) | ||||||
|  |     @endif | ||||||
|  | 
 | ||||||
|     @if (isset($payments) && $payments && count($payments)) |     @if (isset($payments) && $payments && count($payments)) | ||||||
|         <tr><td>{{ strtoupper(trans('texts.payments')) }}</td></tr> |         <tr><td>{{ strtoupper(trans('texts.payments')) }}</td></tr> | ||||||
|         @include('export.payments') |         @include('export.payments') | ||||||
|  | |||||||
| @ -1,5 +1,6 @@ | |||||||
| <tr> | <tr> | ||||||
|     <td>{{ trans('texts.client') }}</td> |     <td>{{ trans('texts.client') }}</td> | ||||||
|  |     <td>{{ trans('texts.email') }}</td> | ||||||
|     @if ($multiUser) |     @if ($multiUser) | ||||||
|         <td>{{ trans('texts.user') }}</td> |         <td>{{ trans('texts.user') }}</td> | ||||||
|     @endif |     @endif | ||||||
| @ -28,6 +29,7 @@ | |||||||
|     @if (!$invoice->client->is_deleted) |     @if (!$invoice->client->is_deleted) | ||||||
|         <tr> |         <tr> | ||||||
|             <td>{{ $invoice->present()->client }}</td> |             <td>{{ $invoice->present()->client }}</td> | ||||||
|  |             <td>{{ $invoice->present()->email }}</td> | ||||||
|             @if ($multiUser) |             @if ($multiUser) | ||||||
|                 <td>{{ $invoice->present()->user }}</td> |                 <td>{{ $invoice->present()->user }}</td> | ||||||
|             @endif |             @endif | ||||||
|  | |||||||
							
								
								
									
										55
									
								
								resources/views/export/recurring_invoices.blade.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								resources/views/export/recurring_invoices.blade.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,55 @@ | |||||||
|  | <tr> | ||||||
|  |     <td>{{ trans('texts.client') }}</td> | ||||||
|  |     <td>{{ trans('texts.email') }}</td> | ||||||
|  |     @if ($multiUser) | ||||||
|  |         <td>{{ trans('texts.user') }}</td> | ||||||
|  |     @endif | ||||||
|  |     <td>{{ trans('texts.frequency') }}</td> | ||||||
|  |     <td>{{ trans('texts.balance') }}</td> | ||||||
|  |     <td>{{ trans('texts.amount') }}</td> | ||||||
|  |     <td>{{ trans('texts.po_number') }}</td> | ||||||
|  |     <td>{{ trans('texts.status') }}</td> | ||||||
|  |     @if ($account->custom_invoice_label1) | ||||||
|  |         <td>{{ $account->custom_invoice_label1 }}</td> | ||||||
|  |     @endif | ||||||
|  |     @if ($account->custom_invoice_label2) | ||||||
|  |         <td>{{ $account->custom_invoice_label2 }}</td> | ||||||
|  |     @endif | ||||||
|  |     @if ($account->custom_invoice_text_label1) | ||||||
|  |         <td>{{ $account->custom_invoice_text_label1 }}</td> | ||||||
|  |     @endif | ||||||
|  |     @if ($account->custom_invoice_text_label2) | ||||||
|  |         <td>{{ $account->custom_invoice_text_label2 }}</td> | ||||||
|  |     @endif | ||||||
|  | </tr> | ||||||
|  | 
 | ||||||
|  | @foreach ($recurringInvoices as $invoice) | ||||||
|  |     @if (!$invoice->client->is_deleted) | ||||||
|  |         <tr> | ||||||
|  |             <td>{{ $invoice->present()->client }}</td> | ||||||
|  |             <td>{{ $invoice->present()->email }}</td> | ||||||
|  |             @if ($multiUser) | ||||||
|  |                 <td>{{ $invoice->present()->user }}</td> | ||||||
|  |             @endif | ||||||
|  |             <td>{{ $invoice->present()->frequency }}</td> | ||||||
|  |             <td>{{ $account->formatMoney($invoice->balance, $invoice->client) }}</td> | ||||||
|  |             <td>{{ $account->formatMoney($invoice->amount, $invoice->client) }}</td> | ||||||
|  |             <td>{{ $invoice->po_number }}</td> | ||||||
|  |             <td>{{ $invoice->present()->status }}</td> | ||||||
|  |             @if ($account->custom_invoice_label1) | ||||||
|  |                 <td>{{ $invoice->custom_value1 }}</td> | ||||||
|  |             @endif | ||||||
|  |             @if ($account->custom_invoice_label2) | ||||||
|  |                 <td>{{ $invoice->custom_value2 }}</td> | ||||||
|  |             @endif | ||||||
|  |             @if ($account->custom_invoice_label1) | ||||||
|  |                 <td>{{ $invoice->custom_text_value1 }}</td> | ||||||
|  |             @endif | ||||||
|  |             @if ($account->custom_invoice_label2) | ||||||
|  |                 <td>{{ $invoice->custom_text_value2 }}</td> | ||||||
|  |             @endif | ||||||
|  |         </tr> | ||||||
|  |     @endif | ||||||
|  | @endforeach | ||||||
|  | 
 | ||||||
|  | <tr><td></td></tr> | ||||||
| @ -736,7 +736,7 @@ | |||||||
|   @if (Auth::user()->account->isWhiteLabel())   |   @if (Auth::user()->account->isWhiteLabel())   | ||||||
|     {{ trans('texts.white_labeled') }} |     {{ trans('texts.white_labeled') }} | ||||||
|   @else |   @else | ||||||
|     <a href="#" onclick="$('#whiteLabelModal').modal('show');">{{ trans('texts.white_label_link') }}</a> |     <a href="#" onclick="loadImages('#whiteLabelModal');$('#whiteLabelModal').modal('show');">{{ trans('texts.white_label_link') }}</a> | ||||||
| 
 | 
 | ||||||
|     <div class="modal fade" id="whiteLabelModal" tabindex="-1" role="dialog" aria-labelledby="whiteLabelModalLabel" aria-hidden="true"> |     <div class="modal fade" id="whiteLabelModal" tabindex="-1" role="dialog" aria-labelledby="whiteLabelModalLabel" aria-hidden="true"> | ||||||
|       <div class="modal-dialog"> |       <div class="modal-dialog"> | ||||||
| @ -751,11 +751,11 @@ | |||||||
|             <div class="row"> |             <div class="row"> | ||||||
|                 <div class="col-md-6"> |                 <div class="col-md-6"> | ||||||
|                     <h4>{{ trans('texts.before') }}</h4> |                     <h4>{{ trans('texts.before') }}</h4> | ||||||
|                     {!! HTML::image('images/pro_plan/white_label_before.png', 'before', ['width' => '100%']) !!} |                     <img src="{{ BLANK_IMAGE }}" data-src="http://ninja.dev/images/pro_plan/white_label_before.png" width="100%" alt="before"> | ||||||
|                 </div> |                 </div> | ||||||
|                 <div class="col-md-6"> |                 <div class="col-md-6"> | ||||||
|                     <h4>{{ trans('texts.after') }}</h4> |                     <h4>{{ trans('texts.after') }}</h4> | ||||||
|                     {!! HTML::image('images/pro_plan/white_label_after.png', 'after', ['width' => '100%']) !!} |                     <img src="{{ BLANK_IMAGE }}" data-src="http://ninja.dev/images/pro_plan/white_label_after.png" width="100%" alt="after"> | ||||||
|                 </div> |                 </div> | ||||||
|             </div> |             </div> | ||||||
|           </div> |           </div> | ||||||
|  | |||||||
| @ -4,13 +4,15 @@ | |||||||
| 	@parent | 	@parent | ||||||
| 
 | 
 | ||||||
|     @include('money_script') |     @include('money_script') | ||||||
|  | 
 | ||||||
|     @foreach ($account->getFontFolders() as $font) |     @foreach ($account->getFontFolders() as $font) | ||||||
|         <script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script> |         <script src="{{ asset('js/vfs_fonts/'.$font.'.js') }}" type="text/javascript"></script> | ||||||
|     @endforeach |     @endforeach | ||||||
| 	<script src="{{ asset('pdf.built.js') }}" type="text/javascript"></script> | 	<script src="{{ asset('pdf.built.js') }}" type="text/javascript"></script> | ||||||
|  |     <script src="{{ asset('js/lightbox.min.js') }}" type="text/javascript"></script> | ||||||
|  |     <link href="{{ asset('css/lightbox.css') }}" rel="stylesheet" type="text/css"/> | ||||||
| 
 | 
 | ||||||
|     <style type="text/css"> |     <style type="text/css"> | ||||||
| 
 |  | ||||||
|         /* the value is auto set so we're removing the bold formatting */ |         /* the value is auto set so we're removing the bold formatting */ | ||||||
|         label.control-label[for=invoice_number] { |         label.control-label[for=invoice_number] { | ||||||
|             font-weight: normal !important; |             font-weight: normal !important; | ||||||
|  | |||||||
| @ -22,13 +22,25 @@ | |||||||
| 
 | 
 | ||||||
|       <center id="designThumbs"> |       <center id="designThumbs"> | ||||||
|         <p> </p> |         <p> </p> | ||||||
|         <a href="{{ asset('/images/designs/business.png') }}" data-lightbox="more-designs" data-title="Business"><img src="{{ asset('/images/designs/business_thumb.png') }}"/></a>     |         <a href="{{ asset('/images/designs/business.png') }}" data-lightbox="more-designs" data-title="Business"> | ||||||
|         <a href="{{ asset('/images/designs/creative.png') }}" data-lightbox="more-designs" data-title="Creative"><img src="{{ asset('/images/designs/creative_thumb.png') }}"/></a>     |             <img src="{{ BLANK_IMAGE }}" data-src="{{ asset('/images/designs/business_thumb.png') }}"/> | ||||||
|         <a href="{{ asset('/images/designs/elegant.png') }}" data-lightbox="more-designs" data-title="Elegant"><img src="{{ asset('/images/designs/elegant_thumb.png') }}"/></a> |         </a>     | ||||||
|  |         <a href="{{ asset('/images/designs/creative.png') }}" data-lightbox="more-designs" data-title="Creative"> | ||||||
|  |             <img src="{{ BLANK_IMAGE }}" data-src="{{ asset('/images/designs/creative_thumb.png') }}"/> | ||||||
|  |         </a>     | ||||||
|  |         <a href="{{ asset('/images/designs/elegant.png') }}" data-lightbox="more-designs" data-title="Elegant"> | ||||||
|  |             <img src="{{ BLANK_IMAGE }}" data-src="{{ asset('/images/designs/elegant_thumb.png') }}"/> | ||||||
|  |         </a> | ||||||
|         <p> </p> |         <p> </p> | ||||||
|         <a href="{{ asset('/images/designs/hipster.png') }}" data-lightbox="more-designs" data-title="Hipster"><img src="{{ asset('/images/designs/hipster_thumb.png') }}"/></a>     |         <a href="{{ asset('/images/designs/hipster.png') }}" data-lightbox="more-designs" data-title="Hipster"> | ||||||
|         <a href="{{ asset('/images/designs/playful.png') }}" data-lightbox="more-designs" data-title="Playful"><img src="{{ asset('/images/designs/playful_thumb.png') }}"/></a>     |             <img src="{{ BLANK_IMAGE }}" data-src="{{ asset('/images/designs/hipster_thumb.png') }}"/> | ||||||
|         <a href="{{ asset('/images/designs/photo.png') }}" data-lightbox="more-designs" data-title="Photo"><img src="{{ asset('/images/designs/photo_thumb.png') }}"/></a>         |         </a>     | ||||||
|  |         <a href="{{ asset('/images/designs/playful.png') }}" data-lightbox="more-designs" data-title="Playful"> | ||||||
|  |             <img src="{{ BLANK_IMAGE }}" data-src="{{ asset('/images/designs/playful_thumb.png') }}"/> | ||||||
|  |         </a>     | ||||||
|  |         <a href="{{ asset('/images/designs/photo.png') }}" data-lightbox="more-designs" data-title="Photo"> | ||||||
|  |             <img src="{{ BLANK_IMAGE }}" data-src="{{ asset('/images/designs/photo_thumb.png') }}"/> | ||||||
|  |         </a> | ||||||
|         <p> </p> |         <p> </p> | ||||||
|       </center> |       </center> | ||||||
| 
 | 
 | ||||||
| @ -133,6 +145,7 @@ | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   function showMoreDesigns() { |   function showMoreDesigns() { | ||||||
|  |     loadImages('#designThumbs'); | ||||||
|     trackEvent('/account', '/view_more_designs'); |     trackEvent('/account', '/view_more_designs'); | ||||||
|     $('#moreDesignsModal').modal('show'); |     $('#moreDesignsModal').modal('show'); | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -87,6 +87,7 @@ | |||||||
|             </tr> |             </tr> | ||||||
|         </thead> |         </thead> | ||||||
|         <tbody> |         <tbody> | ||||||
|  |             @if (count($displayData)) | ||||||
|                 @foreach ($displayData as $record) |                 @foreach ($displayData as $record) | ||||||
|                     <tr> |                     <tr> | ||||||
|                         @foreach ($record as $field) |                         @foreach ($record as $field) | ||||||
| @ -94,6 +95,11 @@ | |||||||
|                         @endforeach |                         @endforeach | ||||||
|                     </tr> |                     </tr> | ||||||
|                 @endforeach |                 @endforeach | ||||||
|  |             @else | ||||||
|  |                 <tr> | ||||||
|  |                     <td colspan="10" style="text-align: center">{{ trans('texts.empty_table') }}</td> | ||||||
|  |                 </tr> | ||||||
|  |             @endif | ||||||
|         </tbody> |         </tbody> | ||||||
|         </table> |         </table> | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user