diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php
index 45f2bc9174..4889144bea 100644
--- a/app/Http/Controllers/InvoiceController.php
+++ b/app/Http/Controllers/InvoiceController.php
@@ -13,6 +13,7 @@ use URL;
use Datatable;
use finfo;
use Request;
+use DropdownButton;
use App\Models\Invoice;
use App\Models\Invitation;
use App\Models\Client;
@@ -280,6 +281,40 @@ class InvoiceController extends BaseController
$invoice->end_date = Utils::fromSqlDate($invoice->end_date);
$invoice->is_pro = Auth::user()->isPro();
+ $actions = [
+ ['url' => 'javascript:onCloneClick()', 'label' => trans("texts.clone_{$entityType}")],
+ ['url' => URL::to("{$entityType}s/{$entityType}_history/{$invoice->public_id}"), 'label' => trans("texts.view_history")],
+ DropdownButton::DIVIDER
+ ];
+
+ if ($invoice->invoice_status_id < INVOICE_STATUS_SENT && !$invoice->is_recurring) {
+ $actions[] = ['url' => 'javascript:onMarkClick()', 'label' => trans("texts.mark_sent")];
+ }
+
+ if ($entityType == ENTITY_QUOTE) {
+ if ($invoice->quote_invoice_id) {
+ $actions[] = ['url' => URL::to("invoices/{$invoice->quote_invoice_id}/edit"), 'label' => trans("texts.view_invoice")];
+ } else {
+ $actions[] = ['url' => 'javascript:onConvertClick()', 'label' => trans("texts.convert_to_invoice")];
+ }
+ } elseif ($entityType == ENTITY_INVOICE) {
+ if ($invoice->quote_id) {
+ $actions[] = ['url' => URL::to("quotes/{$invoice->quote_id}/edit"), 'label' => trans("texts.view_quote")];
+ }
+
+ if (!$invoice->is_recurring && $invoice->balance > 0) {
+ $actions[] = ['url' => 'javascript:onPaymentClick()', 'label' => trans('texts.enter_payment')];
+ }
+ }
+
+ if (count($actions) > 3) {
+ $actions[] = DropdownButton::DIVIDER;
+ }
+
+ $actions[] = ['url' => 'javascript:onArchiveClick()', 'label' => trans("texts.archive_{$entityType}")];
+ $actions[] = ['url' => 'javascript:onDeleteClick()', 'label' => trans("texts.delete_{$entityType}")];
+
+
$data = array(
'entityType' => $entityType,
'showBreadcrumbs' => $clone,
@@ -290,7 +325,8 @@ class InvoiceController extends BaseController
'invitationContactIds' => $contactIds,
'url' => $url,
'title' => trans("texts.edit_{$entityType}"),
- 'client' => $invoice->client, );
+ 'client' => $invoice->client,
+ 'actions' => $actions);
$data = array_merge($data, self::getViewModel());
// Set the invitation link on the client's contacts
diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php
index 54767b089e..88dcf24aa6 100644
--- a/app/Http/Controllers/PaymentController.php
+++ b/app/Http/Controllers/PaymentController.php
@@ -90,7 +90,7 @@ class PaymentController extends BaseController
}
$table->addColumn('transaction_reference', function ($model) { return $model->transaction_reference ? $model->transaction_reference : 'Manual entry'; })
- ->addColumn('payment_type', function ($model) { return $model->payment_type ? $model->payment_type : ($model->account_gateway_id ? 'Online payment' : ''); });
+ ->addColumn('payment_type', function ($model) { return $model->payment_type ? $model->payment_type : ($model->account_gateway_id ? $model->gateway_name : ''); });
return $table->addColumn('amount', function ($model) { return Utils::formatMoney($model->amount, $model->currency_id); })
->addColumn('payment_date', function ($model) { return Utils::dateToString($model->payment_date); })
diff --git a/app/Http/Middleware/StartupCheck.php b/app/Http/Middleware/StartupCheck.php
index 6a4a38ce24..5575253557 100644
--- a/app/Http/Middleware/StartupCheck.php
+++ b/app/Http/Middleware/StartupCheck.php
@@ -51,7 +51,7 @@ class StartupCheck
'countries' => 'App\Models\Country',
];
foreach ($cachedTables as $name => $class) {
- if (!Cache::has($name)) {
+ if (Input::has('clear_cache') || !Cache::has($name)) {
if ($name == 'paymentTerms') {
$orderBy = 'num_days';
} elseif (in_array($name, ['currencies', 'sizes', 'industries', 'languages', 'countries'])) {
diff --git a/app/Models/Account.php b/app/Models/Account.php
index 3f159fffa2..31877bd317 100644
--- a/app/Models/Account.php
+++ b/app/Models/Account.php
@@ -160,12 +160,19 @@ class Account extends Eloquent
return $height;
}
- public function getNextInvoiceNumber($isQuote = false)
+ public function getNextInvoiceNumber($isQuote = false, $prefix = '')
{
$counter = $isQuote && !$this->share_counter ? $this->quote_number_counter : $this->invoice_number_counter;
- $prefix = $isQuote ? $this->quote_number_prefix : $this->invoice_number_prefix;
+ $prefix .= $isQuote ? $this->quote_number_prefix : $this->invoice_number_prefix;
+
+ // confirm the invoice number isn't already taken
+ do {
+ $number = $prefix.str_pad($counter, 4, "0", STR_PAD_LEFT);
+ $check = Invoice::scope()->whereInvoiceNumber($number)->withTrashed()->first();
+ $counter++;
+ } while ($check);
- return $prefix.str_pad($counter, 4, "0", STR_PAD_LEFT);
+ return $number;
}
public function incrementCounter($invoiceNumber, $isQuote = false, $isRecurring)
diff --git a/app/Ninja/Repositories/InvoiceRepository.php b/app/Ninja/Repositories/InvoiceRepository.php
index 84707010d7..d8e6803674 100644
--- a/app/Ninja/Repositories/InvoiceRepository.php
+++ b/app/Ninja/Repositories/InvoiceRepository.php
@@ -465,7 +465,8 @@ class InvoiceRepository
'custom_value1',
'custom_value2',
'custom_taxes1',
- 'custom_taxes2', ] as $field) {
+ 'custom_taxes2',
+ 'partial'] as $field) {
$clone->$field = $invoice->$field;
}
diff --git a/app/Ninja/Repositories/PaymentRepository.php b/app/Ninja/Repositories/PaymentRepository.php
index ae8dec5eb8..8c0a87839d 100644
--- a/app/Ninja/Repositories/PaymentRepository.php
+++ b/app/Ninja/Repositories/PaymentRepository.php
@@ -15,11 +15,13 @@ class PaymentRepository
->join('invoices', 'invoices.id', '=', 'payments.invoice_id')
->join('contacts', 'contacts.client_id', '=', 'clients.id')
->leftJoin('payment_types', 'payment_types.id', '=', 'payments.payment_type_id')
+ ->leftJoin('account_gateways', 'account_gateways.id', '=', 'payments.account_gateway_id')
+ ->leftJoin('gateways', 'gateways.id', '=', 'account_gateways.gateway_id')
->where('payments.account_id', '=', \Auth::user()->account_id)
->where('clients.deleted_at', '=', null)
->where('contacts.is_primary', '=', true)
->where('contacts.deleted_at', '=', null)
- ->select('payments.public_id', 'payments.transaction_reference', 'clients.name as client_name', 'clients.public_id as client_public_id', 'payments.amount', 'payments.payment_date', 'invoices.public_id as invoice_public_id', 'invoices.invoice_number', 'clients.currency_id', 'contacts.first_name', 'contacts.last_name', 'contacts.email', 'payment_types.name as payment_type', 'payments.account_gateway_id', 'payments.deleted_at', 'payments.is_deleted', 'invoices.is_deleted as invoice_is_deleted');
+ ->select('payments.public_id', 'payments.transaction_reference', 'clients.name as client_name', 'clients.public_id as client_public_id', 'payments.amount', 'payments.payment_date', 'invoices.public_id as invoice_public_id', 'invoices.invoice_number', 'clients.currency_id', 'contacts.first_name', 'contacts.last_name', 'contacts.email', 'payment_types.name as payment_type', 'payments.account_gateway_id', 'payments.deleted_at', 'payments.is_deleted', 'invoices.is_deleted as invoice_is_deleted', 'gateways.name as gateway_name');
if (!\Session::get('show_trash:payment')) {
$query->where('payments.deleted_at', '=', null)
diff --git a/database/seeds/PaymentLibrariesSeeder.php b/database/seeds/PaymentLibrariesSeeder.php
index c46a66bada..b99e3ea000 100644
--- a/database/seeds/PaymentLibrariesSeeder.php
+++ b/database/seeds/PaymentLibrariesSeeder.php
@@ -65,6 +65,7 @@ class PaymentLibrariesSeeder extends Seeder
['name' => 'Guatemalan Quetzal', 'code' => 'GTQ', 'symbol' => 'Q', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
['name' => 'Malaysian Ringgit', 'code' => 'MYR', 'symbol' => 'RM', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
['name' => 'Brazilian Real', 'code' => 'BRL', 'symbol' => 'R$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
+ ['name' => 'Thai baht', 'code' => 'THB', 'symbol' => 'THB ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
];
foreach ($currencies as $currency) {
diff --git a/public/css/built.css b/public/css/built.css
index f782f5b6df..7bd5397d5e 100644
--- a/public/css/built.css
+++ b/public/css/built.css
@@ -2449,6 +2449,9 @@ table.dataTable thead > tr > th, table.invoice-table thead > tr > th {
background-color: #e37329 !important;
color:#fff;
}
+table.dataTable tr:hover {
+ background-color: #f0f9ff !important;
+}
th:first-child {
border-radius: 3px 0 0 0;
border-left: none;
@@ -2467,7 +2470,7 @@ border-bottom: 1px solid #dfe0e1;
table.dataTable.no-footer {
border-bottom: none;
}
-.table-striped>tbody>tr:nth-child(odd)>td,
+.table-striped>tbody>tr:nth-child(odd)>tr,
.table-striped>tbody>tr:nth-child(odd)>th {
background-color: #FDFDFD;
}
@@ -2617,7 +2620,11 @@ margin-left: 0px;
.btn-primary i{
border-color: #0b4d78;
}
-.form-actions .btn { margin-left: 10px; }
+
+.form-actions .btn,
+.form-actions div.btn-group {
+ margin-left: 10px;
+}
.form-actions .btn.btn-success:first-child {
margin-left: 10px !important;
@@ -2863,7 +2870,7 @@ background-clip: padding-box;
.dashboard .panel-body {padding: 0;}
.dashboard .table-striped>tbody>tr>td, .table-striped>tbody>tr>th { background-color: #fbfbfb;}
-.dashboard .table-striped>tbody>tr:nth-child(odd)>td, .table-striped>tbody>tr:nth-child(odd)>th {
+.dashboard .table-striped>tbody>tr:nth-child(odd)>tr, .table-striped>tbody>tr:nth-child(odd)>th {
background-color: #fff;
}
.dashboard th {
diff --git a/public/css/style.css b/public/css/style.css
index 0c8e5e6bd3..a7c7ecc103 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -65,6 +65,9 @@ table.dataTable thead > tr > th, table.invoice-table thead > tr > th {
background-color: #e37329 !important;
color:#fff;
}
+table.dataTable tr:hover {
+ background-color: #f0f9ff !important;
+}
th:first-child {
border-radius: 3px 0 0 0;
border-left: none;
@@ -83,7 +86,7 @@ border-bottom: 1px solid #dfe0e1;
table.dataTable.no-footer {
border-bottom: none;
}
-.table-striped>tbody>tr:nth-child(odd)>td,
+.table-striped>tbody>tr:nth-child(odd)>tr,
.table-striped>tbody>tr:nth-child(odd)>th {
background-color: #FDFDFD;
}
@@ -233,7 +236,11 @@ margin-left: 0px;
.btn-primary i{
border-color: #0b4d78;
}
-.form-actions .btn { margin-left: 10px; }
+
+.form-actions .btn,
+.form-actions div.btn-group {
+ margin-left: 10px;
+}
.form-actions .btn.btn-success:first-child {
margin-left: 10px !important;
@@ -479,7 +486,7 @@ background-clip: padding-box;
.dashboard .panel-body {padding: 0;}
.dashboard .table-striped>tbody>tr>td, .table-striped>tbody>tr>th { background-color: #fbfbfb;}
-.dashboard .table-striped>tbody>tr:nth-child(odd)>td, .table-striped>tbody>tr:nth-child(odd)>th {
+.dashboard .table-striped>tbody>tr:nth-child(odd)>tr, .table-striped>tbody>tr:nth-child(odd)>th {
background-color: #fff;
}
.dashboard th {
diff --git a/public/favicon.png b/public/favicon.png
old mode 100755
new mode 100644
index be1df9c3be..41739df6c3
Binary files a/public/favicon.png and b/public/favicon.png differ
diff --git a/resources/lang/da/texts.php b/resources/lang/da/texts.php
index 3eee077751..b7169eb781 100644
--- a/resources/lang/da/texts.php
+++ b/resources/lang/da/texts.php
@@ -676,5 +676,6 @@ return array(
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
'partial_value' => 'Must be greater than zero and less than the total',
-
+ 'more_actions' => 'More Actions',
+
);
diff --git a/resources/lang/de/texts.php b/resources/lang/de/texts.php
index 8d6c2afbad..5dba358e22 100644
--- a/resources/lang/de/texts.php
+++ b/resources/lang/de/texts.php
@@ -667,6 +667,6 @@ return array(
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
'partial_value' => 'Must be greater than zero and less than the total',
-
+ 'more_actions' => 'More Actions',
);
\ No newline at end of file
diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php
index 6ca02ab69c..92dca9e3b9 100644
--- a/resources/lang/en/texts.php
+++ b/resources/lang/en/texts.php
@@ -443,7 +443,7 @@ return array(
'share_invoice_counter' => 'Share invoice counter',
'invoice_issued_to' => 'Invoice issued to',
'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix',
- 'mark_sent' => 'Mark sent',
+ 'mark_sent' => 'Mark Sent',
'gateway_help_1' => ':link to sign up for Authorize.net.',
'gateway_help_2' => ':link to sign up for Authorize.net.',
@@ -674,5 +674,6 @@ return array(
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
'partial_value' => 'Must be greater than zero and less than the total',
+ 'more_actions' => 'More Actions',
);
diff --git a/resources/lang/es/texts.php b/resources/lang/es/texts.php
index a09863880c..0d018879a0 100644
--- a/resources/lang/es/texts.php
+++ b/resources/lang/es/texts.php
@@ -646,6 +646,6 @@ return array(
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
'partial_value' => 'Must be greater than zero and less than the total',
-
+ 'more_actions' => 'More Actions',
);
\ No newline at end of file
diff --git a/resources/lang/es_ES/texts.php b/resources/lang/es_ES/texts.php
index 906882c005..2e67ec47b6 100644
--- a/resources/lang/es_ES/texts.php
+++ b/resources/lang/es_ES/texts.php
@@ -675,6 +675,6 @@ return array(
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
'partial_value' => 'Must be greater than zero and less than the total',
-
+ 'more_actions' => 'More Actions',
);
\ No newline at end of file
diff --git a/resources/lang/fr/texts.php b/resources/lang/fr/texts.php
index 4b359e9fc5..879b5f8739 100644
--- a/resources/lang/fr/texts.php
+++ b/resources/lang/fr/texts.php
@@ -667,6 +667,6 @@ return array(
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
'partial_value' => 'Must be greater than zero and less than the total',
-
+ 'more_actions' => 'More Actions',
);
\ No newline at end of file
diff --git a/resources/lang/fr_CA/texts.php b/resources/lang/fr_CA/texts.php
index d40f341e16..915db3d867 100644
--- a/resources/lang/fr_CA/texts.php
+++ b/resources/lang/fr_CA/texts.php
@@ -667,6 +667,6 @@ return array(
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
'partial_value' => 'Must be greater than zero and less than the total',
-
+ 'more_actions' => 'More Actions',
);
diff --git a/resources/lang/it/texts.php b/resources/lang/it/texts.php
index c7ef580fc2..fa4f842e18 100644
--- a/resources/lang/it/texts.php
+++ b/resources/lang/it/texts.php
@@ -669,6 +669,6 @@ return array(
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
'partial_value' => 'Must be greater than zero and less than the total',
-
+ 'more_actions' => 'More Actions',
);
diff --git a/resources/lang/lt/texts.php b/resources/lang/lt/texts.php
index 3a0796f3aa..8d5a878e2e 100644
--- a/resources/lang/lt/texts.php
+++ b/resources/lang/lt/texts.php
@@ -677,7 +677,7 @@ return array(
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
'partial_value' => 'Must be greater than zero and less than the total',
-
+ 'more_actions' => 'More Actions',
);
diff --git a/resources/lang/nb_NO/texts.php b/resources/lang/nb_NO/texts.php
index 400db9ece8..c39965dad0 100644
--- a/resources/lang/nb_NO/texts.php
+++ b/resources/lang/nb_NO/texts.php
@@ -675,6 +675,6 @@ return array(
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
'partial_value' => 'Must be greater than zero and less than the total',
-
+ 'more_actions' => 'More Actions',
);
\ No newline at end of file
diff --git a/resources/lang/nl/texts.php b/resources/lang/nl/texts.php
index a8133525c1..547529e403 100644
--- a/resources/lang/nl/texts.php
+++ b/resources/lang/nl/texts.php
@@ -670,6 +670,6 @@ return array(
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
'partial_value' => 'Must be greater than zero and less than the total',
-
+ 'more_actions' => 'More Actions',
);
diff --git a/resources/lang/pt_BR/texts.php b/resources/lang/pt_BR/texts.php
index aa3ab32d4c..1a59edcd37 100644
--- a/resources/lang/pt_BR/texts.php
+++ b/resources/lang/pt_BR/texts.php
@@ -670,6 +670,6 @@ return array(
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
'partial_value' => 'Must be greater than zero and less than the total',
-
+ 'more_actions' => 'More Actions',
);
diff --git a/resources/lang/sv/texts.php b/resources/lang/sv/texts.php
index 7943caadaa..477355e851 100644
--- a/resources/lang/sv/texts.php
+++ b/resources/lang/sv/texts.php
@@ -673,6 +673,6 @@ return array(
'payment_type_dwolla' => 'Dwolla',
'gateway_help_43' => ':link to sign up for Dwolla.',
'partial_value' => 'Must be greater than zero and less than the total',
-
+ 'more_actions' => 'More Actions',
);
diff --git a/resources/views/accounts/account_gateway.blade.php b/resources/views/accounts/account_gateway.blade.php
index a82e5a9152..13d6cd337e 100644
--- a/resources/views/accounts/account_gateway.blade.php
+++ b/resources/views/accounts/account_gateway.blade.php
@@ -90,8 +90,8 @@
{!! Former::actions(
- Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
- $countGateways > 0 ? Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/company/payments'))->appendIcon(Icon::create('remove-circle')) : false) !!}
+ $countGateways > 0 ? Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/company/payments'))->appendIcon(Icon::create('remove-circle')) : false,
+ Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk'))) !!}
{!! Former::close() !!}
diff --git a/resources/views/accounts/import_map.blade.php b/resources/views/accounts/import_map.blade.php
index 5a1a1df2e4..c2c1559144 100644
--- a/resources/views/accounts/import_map.blade.php
+++ b/resources/views/accounts/import_map.blade.php
@@ -46,8 +46,8 @@
{!! Former::actions(
- Button::success(trans('texts.import'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
- Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/company/import_export'))->appendIcon(Icon::create('remove-circle'))) !!}
+ Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/company/import_export'))->appendIcon(Icon::create('remove-circle')),
+ Button::success(trans('texts.import'))->submit()->large()->appendIcon(Icon::create('floppy-disk'))) !!}
{!! Former::close() !!}
- {!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/clients/' . ($client ? $client->public_id : '')))->appendIcon(Icon::create('remove-circle')) !!}
+ {!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
{!! Former::close() !!}
diff --git a/resources/views/credits/edit.blade.php b/resources/views/credits/edit.blade.php
index d1e7d2b734..3cb86b89fe 100644
--- a/resources/views/credits/edit.blade.php
+++ b/resources/views/credits/edit.blade.php
@@ -27,8 +27,8 @@
- {!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/credits'))->appendIcon(Icon::create('remove-circle')) !!}
+ {!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
{!! Former::close() !!}
diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php
index 3f1faa16d5..2660b9e9c4 100644
--- a/resources/views/invoices/edit.blade.php
+++ b/resources/views/invoices/edit.blade.php
@@ -333,52 +333,19 @@
{!! Button::primary(trans('texts.download_pdf'))->withAttributes(array('onclick' => 'onDownloadClick()'))->appendIcon(Icon::create('download-alt')) !!}
@if (!$invoice || (!$invoice->trashed() && !$invoice->client->trashed()))
- @if ($invoice && $invoice->id)
-
-
-
-
-
-
- @else
- {!! Button::success(trans("texts.save_{$entityType}"))->withAttributes(array('id' => 'saveButton', 'onclick' => 'onSaveClick()'))->appendIcon(Icon::create('floppy-disk')) !!}
- @endif
+ {!! Button::success(trans("texts.save_{$entityType}"))->withAttributes(array('id' => 'saveButton', 'onclick' => 'onSaveClick()'))->appendIcon(Icon::create('floppy-disk')) !!}
@if (!$invoice || ($invoice && !$invoice->is_recurring))
- {!! Button::normal(trans("texts.email_{$entityType}"))->withAttributes(array('id' => 'email_button', 'onclick' => 'onEmailClick()'))->appendIcon(Icon::create('send')) !!}
+ {!! Button::info(trans("texts.email_{$entityType}"))->withAttributes(array('id' => 'email_button', 'onclick' => 'onEmailClick()'))->appendIcon(Icon::create('send')) !!}
@endif
- @if ($invoice && $invoice->id && $entityType == ENTITY_INVOICE && !$invoice->is_recurring && $invoice->balance > 0)
- {!! Button::primary(trans('texts.enter_payment'))->withAttributes(array('onclick' => 'onPaymentClick()'))->appendIcon(Icon::create('usd')) !!}
- @endif
+ @if ($invoice && $invoice->id)
+ {!! DropdownButton::normal(trans('texts.more_actions'))
+ ->withContents($actions)
+ ->dropup() !!}
+ @endif
+
@elseif ($invoice && $invoice->trashed() && !$invoice->is_deleted == '1')
{!! Button::success(trans('texts.restore'))->withAttributes(['onclick' => 'submitAction("restore")'])->appendIcon(Icon::create('cloud-download')) !!}
@endif
@@ -664,10 +631,6 @@
onPaymentClick();
});
- $('#primaryActions > button:first').click(function() {
- onSaveClick();
- });
-
$('label.radio').addClass('radio-inline');
applyComboboxListeners();
@@ -723,10 +686,10 @@
@if (!$invoice)
if (!invoice.terms) {
- invoice.terms = wordWrapText('{{ str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_terms)) }}', 300);
+ invoice.terms = wordWrapText('{!! str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_terms)) !!}', 300);
}
if (!invoice.invoice_footer) {
- invoice.invoice_footer = wordWrapText('{{ str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_footer)) }}', 600);
+ invoice.invoice_footer = wordWrapText('{!! str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_footer)) !!}', 600);
}
@endif
@@ -1129,10 +1092,10 @@
self.frequency_id = ko.observable('');
//self.currency_id = ko.observable({{ $client && $client->currency_id ? $client->currency_id : Session::get(SESSION_CURRENCY) }});
self.terms = ko.observable('');
- self.default_terms = ko.observable({{ !$invoice && $account->invoice_terms ? 'true' : 'false' }} ? wordWrapText('{{ str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_terms)) }}', 300) : '');
+ self.default_terms = ko.observable({{ !$invoice && $account->invoice_terms ? 'true' : 'false' }} ? wordWrapText('{!! str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_terms)) !!}', 300) : '');
self.set_default_terms = ko.observable(false);
self.invoice_footer = ko.observable('');
- self.default_footer = ko.observable({{ !$invoice && $account->invoice_footer ? 'true' : 'false' }} ? wordWrapText('{{ str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_footer)) }}', 600) : '');
+ self.default_footer = ko.observable({{ !$invoice && $account->invoice_footer ? 'true' : 'false' }} ? wordWrapText('{!! str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_footer)) !!}', 600) : '');
self.set_default_footer = ko.observable(false);
self.public_notes = ko.observable('');
self.po_number = ko.observable('');
diff --git a/resources/views/master.blade.php b/resources/views/master.blade.php
index d494e2acdd..9d6d07c489 100644
--- a/resources/views/master.blade.php
+++ b/resources/views/master.blade.php
@@ -20,7 +20,7 @@
-
+
diff --git a/resources/views/payments/edit.blade.php b/resources/views/payments/edit.blade.php
index 0d402c9514..26b3862831 100644
--- a/resources/views/payments/edit.blade.php
+++ b/resources/views/payments/edit.blade.php
@@ -38,8 +38,8 @@
+ {!! Button::normal(trans('texts.cancel'))->appendIcon(Icon::create('remove-circle'))->asLinkTo(URL::to('/payments'))->large() !!}
{!! Button::success(trans('texts.save'))->appendIcon(Icon::create('floppy-disk'))->submit()->large() !!}
- {!! Button::withValue(trans('texts.cancel'))->appendIcon(Icon::create('remove-circle'))->asLinkTo(URL::to('/payments'))->large() !!}
{!! Former::close() !!}
diff --git a/resources/views/tasks/edit.blade.php b/resources/views/tasks/edit.blade.php
index 660336e539..703b36ec4e 100644
--- a/resources/views/tasks/edit.blade.php
+++ b/resources/views/tasks/edit.blade.php
@@ -112,13 +112,13 @@
{!! Button::success(trans('texts.save'))->large()->appendIcon(Icon::create('floppy-disk'))->withAttributes(['id' => 'save-button']) !!}
{!! Button::primary(trans('texts.stop'))->large()->appendIcon(Icon::create('stop'))->withAttributes(['id' => 'stop-button']) !!}
@else
+ {!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/tasks'))->appendIcon(Icon::create('remove-circle')) !!}
@if ($task)
{!! Button::success(trans('texts.save'))->large()->appendIcon(Icon::create('floppy-disk'))->withAttributes(['id' => 'save-button']) !!}
@else
{!! Button::success(trans('texts.start'))->large()->appendIcon(Icon::create('play'))->withAttributes(['id' => 'start-button']) !!}
{!! Button::success(trans('texts.save'))->large()->appendIcon(Icon::create('floppy-disk'))->withAttributes(['id' => 'save-button', 'style' => 'display:none']) !!}
@endif
- {!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/tasks'))->appendIcon(Icon::create('remove-circle')) !!}
@endif
@@ -201,7 +201,7 @@
$('#start_hours').val((date.getHours() % 12) || 12);
$('#start_minutes').val(date.getMinutes());
$('#start_seconds').val(date.getSeconds());
- $('#start_ampm').val(date.getHours() > 12 ? 'PM' : 'AM');
+ $('#start_ampm').val(date.getHours() >= 12 ? 'PM' : 'AM');
@endif
@if (!$task && !$clientPublicId)
@@ -212,7 +212,7 @@
$('input[type=radio').change(function(event) {
var val = $(event.target).val();
- if (val == 'now') {
+ if (val == 'timer') {
$('#datetime-details').hide();
} else {
$('#datetime-details').fadeIn();
diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php
index 4d23272702..ac7c621e22 100644
--- a/resources/views/users/edit.blade.php
+++ b/resources/views/users/edit.blade.php
@@ -28,8 +28,8 @@
{!! Former::actions(
- Button::success(trans($user && $user->confirmed ? 'texts.save' : 'texts.send_invite'))->submit()->large()->appendIcon(Icon::create($user && $user->confirmed ? 'floppy-disk' : 'send')),
- Button::normal(trans('texts.cancel'))->asLinkTo(URL::to('/company/advanced_settings/user_management'))->appendIcon(Icon::create('remove-circle'))->large()
+ Button::normal(trans('texts.cancel'))->asLinkTo(URL::to('/company/advanced_settings/user_management'))->appendIcon(Icon::create('remove-circle'))->large(),
+ Button::success(trans($user && $user->confirmed ? 'texts.save' : 'texts.send_invite'))->submit()->large()->appendIcon(Icon::create($user && $user->confirmed ? 'floppy-disk' : 'send'))
)!!}
{!! Former::close() !!}