mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-19 16:01:34 +02:00
Bug fixes
This commit is contained in:
parent
060a14736b
commit
b80842759e
@ -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
|
||||
|
@ -90,7 +90,7 @@ class PaymentController extends BaseController
|
||||
}
|
||||
|
||||
$table->addColumn('transaction_reference', function ($model) { return $model->transaction_reference ? $model->transaction_reference : '<i>Manual entry</i>'; })
|
||||
->addColumn('payment_type', function ($model) { return $model->payment_type ? $model->payment_type : ($model->account_gateway_id ? '<i>Online payment</i>' : ''); });
|
||||
->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); })
|
||||
|
@ -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'])) {
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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) {
|
||||
|
13
public/css/built.css
vendored
13
public/css/built.css
vendored
@ -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 {
|
||||
|
13
public/css/style.css
vendored
13
public/css/style.css
vendored
@ -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 {
|
||||
|
BIN
public/favicon.png
Executable file → Normal file
BIN
public/favicon.png
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 23 KiB |
@ -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',
|
||||
|
||||
);
|
||||
|
@ -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',
|
||||
|
||||
);
|
@ -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',
|
||||
|
||||
);
|
||||
|
@ -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',
|
||||
|
||||
);
|
@ -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',
|
||||
|
||||
);
|
@ -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',
|
||||
|
||||
);
|
@ -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',
|
||||
|
||||
);
|
||||
|
@ -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',
|
||||
|
||||
);
|
||||
|
@ -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',
|
||||
|
||||
);
|
||||
|
||||
|
@ -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',
|
||||
|
||||
);
|
@ -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',
|
||||
|
||||
);
|
||||
|
@ -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',
|
||||
|
||||
);
|
||||
|
@ -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',
|
||||
|
||||
);
|
||||
|
@ -90,8 +90,8 @@
|
||||
<p/> <p/>
|
||||
|
||||
{!! 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() !!}
|
||||
|
||||
|
||||
|
@ -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() !!}
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -27,8 +27,8 @@
|
||||
</div>
|
||||
|
||||
{!! Former::actions(
|
||||
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
|
||||
Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/company/products'))->appendIcon(Icon::create('remove-circle'))
|
||||
Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/company/products'))->appendIcon(Icon::create('remove-circle')),
|
||||
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk'))
|
||||
) !!}
|
||||
|
||||
{!! Former::close() !!}
|
||||
|
@ -24,8 +24,8 @@
|
||||
</div>
|
||||
|
||||
{!! Former::actions(
|
||||
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
|
||||
Button::normal(trans('texts.cancel'))->asLinkTo(URL::to('/company/advanced_settings/token_management'))->appendIcon(Icon::create('remove-circle'))->large()
|
||||
Button::normal(trans('texts.cancel'))->asLinkTo(URL::to('/company/advanced_settings/token_management'))->appendIcon(Icon::create('remove-circle'))->large(),
|
||||
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk'))
|
||||
) !!}
|
||||
|
||||
{!! Former::close() !!}
|
||||
|
@ -184,8 +184,8 @@
|
||||
</script>
|
||||
|
||||
<center class="buttons">
|
||||
{!! 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')) !!}
|
||||
</center>
|
||||
|
||||
{!! Former::close() !!}
|
||||
|
@ -27,8 +27,8 @@
|
||||
|
||||
|
||||
<center class="buttons">
|
||||
{!! 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')) !!}
|
||||
</center>
|
||||
|
||||
{!! Former::close() !!}
|
||||
|
@ -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)
|
||||
|
||||
<div id="primaryActions" style="text-align:left" class="btn-group dropup">
|
||||
<button class="btn-success btn" type="button">{{ trans("texts.save_{$entityType}") }}</button>
|
||||
<button class="btn-success btn dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="javascript:onSaveClick()" id="saveButton">{{ trans("texts.save_{$entityType}") }}</a></li>
|
||||
<li><a href="javascript:onCloneClick()">{{ trans("texts.clone_{$entityType}") }}</a></li>
|
||||
<li><a href="{{ URL::to("{$entityType}s/{$entityType}_history/{$invoice->public_id}") }}">{{ trans("texts.view_history") }}</a></li>
|
||||
<li class="divider"></li>
|
||||
|
||||
@if ($invoice->invoice_status_id < INVOICE_STATUS_SENT && !$invoice->is_recurring)
|
||||
<li><a href="javascript:onMarkClick()">{{ trans("texts.mark_sent") }}</a></li>
|
||||
@endif
|
||||
|
||||
@if ($invoice && $entityType == ENTITY_QUOTE)
|
||||
@if ($invoice->quote_invoice_id)
|
||||
<li><a href="{{ URL::to("invoices/{$invoice->quote_invoice_id}/edit") }}">{{ trans("texts.view_invoice") }}</a></li>
|
||||
@else
|
||||
<li><a href="javascript:onConvertClick()">{{ trans("texts.convert_to_invoice") }}</a></li>
|
||||
@endif
|
||||
@elseif ($invoice && $entityType == ENTITY_INVOICE)
|
||||
@if ($invoice->quote_id)
|
||||
<li><a href="{{ URL::to("quotes/{$invoice->quote_id}/edit") }}">{{ trans("texts.view_quote") }}</a></li>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<li class="divider"></li>
|
||||
<li><a href="javascript:onArchiveClick()">{{ trans("texts.archive_{$entityType}") }}</a></li>
|
||||
<li><a href="javascript:onDeleteClick()">{{ trans("texts.delete_{$entityType}") }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@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('');
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<link href="//fonts.googleapis.com/css?family=Roboto:400,700,900,100" rel="stylesheet" type="text/css">
|
||||
<link href="//fonts.googleapis.com/css?family=Roboto+Slab:400,300,700" rel="stylesheet" type="text/css">
|
||||
<link href="{{ asset('favicon.png') }}" rel="shortcut icon">
|
||||
<link href="{{ asset('favicon.png?test') }}" rel="shortcut icon">
|
||||
<link rel="canonical" href="{{ NINJA_APP_URL }}/{{ Request::path() }}" />
|
||||
|
||||
<script src="{{ asset('js/built.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
|
||||
|
@ -38,8 +38,8 @@
|
||||
|
||||
|
||||
<center class="buttons">
|
||||
{!! 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() !!}
|
||||
</center>
|
||||
|
||||
{!! Former::close() !!}
|
||||
|
@ -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
|
||||
</center>
|
||||
|
||||
@ -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();
|
||||
|
@ -28,8 +28,8 @@
|
||||
</div>
|
||||
|
||||
{!! 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() !!}
|
||||
|
Loading…
Reference in New Issue
Block a user