1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Razi KAntorp 2014-04-02 11:45:52 +02:00
commit 43198e47f7
14 changed files with 216 additions and 100 deletions

View File

@ -167,9 +167,9 @@ class AccountController extends \BaseController {
private function export()
{
$output = fopen("php://output",'w') or die("Can't open php://output");
header("Content-Type:application/csv");
header("Content-Disposition:attachment;filename=export.csv");
$output = fopen('php://output','w') or Utils::fatalError();
header('Content-Type:application/csv');
header('Content-Disposition:attachment;filename=export.csv');
$clients = Client::scope()->get();
AccountController::exportData($output, $clients->toArray());
@ -303,14 +303,21 @@ class AccountController extends \BaseController {
Activity::createClient($client);
}
$message = Utils::pluralize('Successfully created ? client', $count);
$message = Utils::pluralize('created_client', $count);
Session::flash('message', $message);
return Redirect::to('clients');
}
private function mapFile()
{
{
$file = Input::file('file');
if ($file == null)
{
Session::flash('error', trans('texts.select_file'));
return Redirect::to('company/import_export');
}
$name = $file->getRealPath();
require_once(app_path().'/includes/parsecsv.lib.php');
@ -320,7 +327,8 @@ class AccountController extends \BaseController {
if (count($csv->data) + Client::scope()->count() > MAX_NUM_CLIENTS)
{
Session::flash('error', "Sorry, this wll exceed the limit of " . MAX_NUM_CLIENTS . " clients");
$message = Utils::pluralize('limit_clients', MAX_NUM_CLIENTS);
Session::flash('error', $message);
return Redirect::to('company/import_export');
}
@ -424,7 +432,7 @@ class AccountController extends \BaseController {
$user->notify_paid = Input::get('notify_paid');
$user->save();
Session::flash('message', 'Successfully updated settings');
Session::flash('message', trans('texts.updated_settings'));
return Redirect::to('company/notifications');
}
@ -474,7 +482,7 @@ class AccountController extends \BaseController {
$account->account_gateways()->save($accountGateway);
}
Session::flash('message', 'Successfully updated settings');
Session::flash('message', trans('texts.updated_settings'));
return Redirect::to('company/payments');
}
}
@ -533,7 +541,7 @@ class AccountController extends \BaseController {
Event::fire('user.refresh');
Session::flash('message', 'Successfully updated details');
Session::flash('message', trans('texts.updated_settings'));
return Redirect::to('company/details');
}
}
@ -542,7 +550,7 @@ class AccountController extends \BaseController {
File::delete('logo/' . Auth::user()->account->account_key . '.jpg');
Session::flash('message', 'Successfully removed logo');
Session::flash('message', trans('texts.removed_logo'));
return Redirect::to('company/details');
}

View File

@ -229,17 +229,16 @@ class ClientController extends \BaseController {
if ($publicId)
{
Session::flash('message', 'Successfully updated client');
Session::flash('message', trans('texts.updated_client'));
}
else
{
Activity::createClient($client);
Session::flash('message', 'Successfully created client');
Session::flash('message', trans('texts.created_client'));
}
return Redirect::to('clients/' . $client->public_id);
}
}
public function bulk()
@ -248,7 +247,7 @@ class ClientController extends \BaseController {
$ids = Input::get('id') ? Input::get('id') : Input::get('ids');
$count = $this->clientRepo->bulk($ids, $action);
$message = Utils::pluralize('Successfully '.$action.'d ? client', $count);
$message = Utils::pluralize($action.'d_client', $count);
Session::flash('message', $message);
return Redirect::to('clients');

View File

@ -121,7 +121,7 @@ class CreditController extends \BaseController {
{
$this->creditRepo->save($publicId, Input::all());
$message = $publicId ? 'Successfully updated credit' : 'Successfully created credit';
$message = trans('texts.created_credit');
Session::flash('message', $message);
return Redirect::to('clients/' . Input::get('client'));
}
@ -135,7 +135,7 @@ class CreditController extends \BaseController {
if ($count > 0)
{
$message = Utils::pluralize('Successfully '.$action.'d ? credit', $count);
$message = Utils::pluralize($action.'d_credit', $count);
Session::flash('message', $message);
}

View File

@ -89,6 +89,11 @@ return array(
'notifications' => 'Notifications',
'import_export' => 'Import/Export',
'done' => 'Done',
'save' => 'Save',
'create' => 'Create',
'upload' => 'Upload',
'import' => 'Import',
'download' => 'Download',
'cancel' => 'Cancel',
'provide_email' => 'Please provide a valid email address',
'powered_by' => 'Powered by',
@ -151,4 +156,88 @@ return array(
'select' => 'Select',
'edit_client' => 'Edit Client',
'edit_invoice' => 'Edit Invoice',
// client view page
'create_invoice' => 'Create Invoice',
'enter_credit' => 'Enter Credit',
'last_logged_in' => 'Last logged in',
'details' => 'Details',
'standing' => 'Standing',
'credit' => 'Credit',
'activity' => 'Activity',
'date' => 'Date',
'message' => 'Message',
'adjustment' => 'Adjustment',
'are_you_sure' => 'Are you sure?',
// new payment page
'payment_type_id' => 'Payment type',
'amount' => 'Amount',
// account/company pages
'work_email' => 'Email',
'language_id' => 'Language',
'timezone_id' => 'Timezone',
'date_format_id' => 'Date format',
'datetime_format_id' => 'Date/Time Format',
'users' => 'Users',
'localization' => 'Localization',
'remove_logo' => 'Remove logo',
'logo_help' => 'Supported: JPEG, GIF and PNG. Recommended height: 120px',
'payment_gateway' => 'Payment Gateway',
'gateway_id' => 'Provider',
'email_notifications' => 'Email Notifications',
'email_sent' => 'Email me when an invoice is <b>sent</b>',
'email_viewed' => 'Email me when an invoice is <b>viewed</b>',
'email_paid' => 'Email me when an invoice is <b>paid</b>',
'site_updates' => 'Site Updates',
'custom_messages' => 'Custom Messages',
'default_invoice_terms' => 'Set default invoice terms',
'default_email_footer' => 'Set default email signature',
'import_clients' => 'Import Client Data',
'csv_file' => 'Select CSV file',
'export_clients' => 'Export Client Data',
'select_file' => 'Please select a file',
'first_row_headers' => 'Use first row as headers',
'column' => 'Column',
'sample' => 'Sample',
'import_to' => 'Import to',
'client_will_create' => 'client will be created',
'clients_will_create' => 'clients will be created',
// application messages
'created_client' => 'Successfully created client',
'created_clients' => 'Successfully created ? clients',
'limit_clients' => 'Sorry, this will exceed the limit of ? clients',
'updated_settings' => 'Successfully updated settings',
'removed_logo' => 'Successfully removed logo',
'updated_client' => 'Successfully updated client',
'created_client' => 'Successfully created client',
'archived_client' => 'Successfully archived client',
'archived_clients' => 'Successfully archived ? clients',
'deleted_client' => 'Successfully deleted client',
'deleted_clients' => 'Successfully deleted ? clients',
'updated_invoice' => 'Successfully updated invoice',
'created_invoice' => 'Successfully created invoice',
'archived_invoice' => 'Successfully archived credit',
'archived_invoices' => 'Successfully archived ? credits',
'deleted_invoice' => 'Successfully deleted credit',
'deleted_invoices' => 'Successfully deleted ? credits',
'created_payment' => 'Successfully created payment',
'archived_payment' => 'Successfully archived payment',
'archived_payments' => 'Successfully archived ? payments',
'deleted_payment' => 'Successfully deleted payment',
'deleted_payments' => 'Successfully deleted ? payments',
'created_credit' => 'Successfully created credit',
'archived_credit' => 'Successfully archived credit',
'archived_credits' => 'Successfully archived ? credits',
'deleted_credit' => 'Successfully deleted credit',
'deleted_credits' => 'Successfully deleted ? credits',
);

View File

@ -35,7 +35,7 @@ class Utils
{
if (!$message)
{
$message = "An error occurred, please try again later";
$message = "An error occurred, please try again later.";
}
static::logError($message . ' ' . $exception);
@ -122,9 +122,10 @@ class Utils
public static function pluralize($string, $count)
{
$field = $count == 1 ? $string : $string . 's';
$string = trans("texts.$field");
$string = str_replace('?', $count, $string);
$field = $count == 1 ? $string : $string . 's';
return trans("texts.$field");
return $string;
}
public static function toArray($data)

View File

@ -423,7 +423,7 @@ class Activity extends Eloquent
}
$activity = Activity::getBlank();
$activity->client_id = $client->id;
$activity->client_id = $credit->client_id;
$activity->credit_id = $credit->id;
$activity->activity_type_id = ACTIVITY_TYPE_ARCHIVE_CREDIT;
$activity->message = Utils::encodeActivity(Auth::user(), 'archived ' . Utils::formatMoney($credit->balance, $credit->client->currency_id) . ' credit');

View File

@ -161,7 +161,7 @@ HTML::macro('breadcrumbs', function() {
$crumb = trim($crumbs[$i]);
if (!$crumb) continue;
if ($crumb == 'company') return '';
$name = ucwords($crumb);
$name = trans("texts.$crumb");
if ($i==count($crumbs)-1)
{
$str .= "<li class='active'>$name</li>";

View File

@ -25,53 +25,53 @@
<div class="row">
<div class="col-md-5">
{{ Former::legend('Details') }}
{{ Former::legend('details') }}
{{ Former::text('name') }}
{{ Former::text('work_email')->label('Email') }}
{{ Former::text('work_phone')->label('Phone') }}
{{ Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp('Supported: JPEG, GIF and PNG. Recommended height: 120px') }}
{{ Former::text('work_email') }}
{{ Former::text('work_phone') }}
{{ Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp(trans('texts.logo_help')) }}
@if (file_exists($account->getLogoPath()))
<center>
{{ HTML::image($account->getLogoPath(), "Logo") }} &nbsp;
<a href="#" onclick="deleteLogo()">Remove logo</a>
<a href="#" onclick="deleteLogo()">{{ trans('texts.remove_logo') }}</a>
</center><br/>
@endif
{{ Former::select('size_id')->addOption('','')->label('Size')
{{ Former::select('size_id')->addOption('','')
->fromQuery($sizes, 'name', 'id') }}
{{ Former::select('industry_id')->addOption('','')->label('Industry')
{{ Former::select('industry_id')->addOption('','')
->fromQuery($industries, 'name', 'id') }}
{{ Former::legend('Address') }}
{{ Former::text('address1')->label('Street') }}
{{ Former::text('address2')->label('Apt/Suite') }}
{{ Former::legend('address') }}
{{ Former::text('address1') }}
{{ Former::text('address2') }}
{{ Former::text('city') }}
{{ Former::text('state')->label('State/Province') }}
{{ Former::text('state') }}
{{ Former::text('postal_code') }}
{{ Former::select('country_id')->addOption('','')->label('Country')
{{ Former::select('country_id')->addOption('','')
->fromQuery($countries, 'name', 'id') }}
</div>
<div class="col-md-5 col-md-offset-1">
{{ Former::legend('Users') }}
{{ Former::legend('users') }}
{{ Former::text('first_name') }}
{{ Former::text('last_name') }}
{{ Former::text('email') }}
{{ Former::text('phone') }}
{{ Former::legend('Localization') }}
{{ Former::select('language_id')->addOption('','')->label('Language')
{{ Former::legend('localization') }}
{{ Former::select('language_id')->addOption('','')
->fromQuery($languages, 'name', 'id') }}
{{ Former::select('currency_id')->addOption('','')->label('Currency')
{{ Former::select('currency_id')->addOption('','')
->fromQuery($currencies, 'name', 'id') }}
{{ Former::select('timezone_id')->addOption('','')->label('Timezone')
{{ Former::select('timezone_id')->addOption('','')
->fromQuery($timezones, 'location', 'id') }}
{{ Former::select('date_format_id')->addOption('','')->label('Date Format')
{{ Former::select('date_format_id')->addOption('','')
->fromQuery($dateFormats, 'label', 'id') }}
{{ Former::select('datetime_format_id')->addOption('','')->label('Date/Time Format')
{{ Former::select('datetime_format_id')->addOption('','')
->fromQuery($datetimeFormats, 'label', 'id') }}
@ -79,7 +79,7 @@
</div>
<center>
{{ Button::lg_success_submit('Save')->append_with_icon('floppy-disk') }}
{{ Button::lg_success_submit(trans('texts.save'))->append_with_icon('floppy-disk') }}
</center>
{{ Former::close() }}
@ -95,7 +95,7 @@
});
function deleteLogo() {
if (confirm('Are you sure?')) {
if (confirm("{{ trans('texts.are_you_sure') }}")) {
$('.removeLogoForm').submit();
}
}

View File

@ -4,14 +4,14 @@
@parent
{{ Former::open_for_files('company/import_map')->addClass('col-md-9 col-md-offset-1') }}
{{ Former::legend('Import Client Data') }}
{{ Former::file('file')->label('Select CSV file') }}
{{ Former::actions( Button::lg_info_submit('Upload')->append_with_icon('open') ) }}
{{ Former::legend('import_clients') }}
{{ Former::file('file')->label(trans('texts.csv_file')) }}
{{ Former::actions( Button::lg_info_submit(trans('texts.upload'))->append_with_icon('open') ) }}
{{ Former::close() }}
{{ Former::open('company/export')->addClass('col-md-9 col-md-offset-1') }}
{{ Former::legend('Export Client Data') }}
{{ Former::actions( Button::lg_primary_submit('Download')->append_with_icon('download-alt') ) }}
{{ Former::legend('export_clients') }}
{{ Former::actions( Button::lg_primary_submit(trans('texts.download'))->append_with_icon('download-alt') ) }}
{{ Former::close() }}
@stop

View File

@ -4,20 +4,20 @@
@parent
{{ Former::open('company/import_export') }}
{{ Former::legend('Import Clients') }}
{{ Former::legend('import_clients') }}
@if ($headers)
<label for="header_checkbox">
<input type="checkbox" name="header_checkbox" id="header_checkbox" {{ $hasHeaders ? 'CHECKED' : '' }}> Use first row as headers
<input type="checkbox" name="header_checkbox" id="header_checkbox" {{ $hasHeaders ? 'CHECKED' : '' }}> {{ trans('texts.first_row_headers') }}
</label>
<table class="table">
<thead>
<tr>
<th>Column</th>
<th class="col_sample">Sample</th>
<th>Import To</th>
<th>{{ trans('texts.column') }}</th>
<th class="col_sample">{{ trans('texts.sample') }}</th>
<th>{{ trans('texts.import_to') }}</th>
</tr>
</thead>
@for ($i=0; $i<count($headers); $i++)
@ -33,7 +33,7 @@
@endif
{{ Former::actions( Button::lg_primary_submit('Import'), '&nbsp;|&nbsp;', link_to('company/import', 'Cancel') ) }}
{{ Former::actions( Button::lg_primary_submit(trans('texts.import')), '&nbsp;|&nbsp;', link_to('company/import', trans('texts.cancel')) ) }}
{{ Former::close() }}
<script type="text/javascript">
@ -55,11 +55,11 @@
{
if (num == 1)
{
$('#numClients').html('1 client will be created');
$('#numClients').html("1 {{ trans('texts.client_will_create') }}");
}
else
{
$('#numClients').html(num + ' clients will be created');
$('#numClients').html(num + " {{ trans('texts.clients_will_create') }}");
}
}

View File

@ -9,12 +9,12 @@
{{ Former::populateField('notify_viewed', intval(Auth::user()->notify_viewed)) }}
{{ Former::populateField('notify_paid', intval(Auth::user()->notify_paid)) }}
{{ Former::legend('Email Notifications') }}
{{ Former::checkbox('notify_sent')->label('&nbsp;')->text('Email me when an invoice is <b>sent</b>') }}
{{ Former::checkbox('notify_viewed')->label('&nbsp;')->text('Email me when an invoice is <b>viewed</b>') }}
{{ Former::checkbox('notify_paid')->label('&nbsp;')->text('Email me when an invoice is <b>paid</b>') }}
{{ Former::legend('email_notifications') }}
{{ Former::checkbox('notify_sent')->label('&nbsp;')->text(trans('texts.email_sent')) }}
{{ Former::checkbox('notify_viewed')->label('&nbsp;')->text(trans('texts.email_viewed')) }}
{{ Former::checkbox('notify_paid')->label('&nbsp;')->text(trans('texts.email_paid')) }}
{{ Former::legend('Site Updates') }}
{{ Former::legend('site_updates') }}
<div class="form-group">
<label for="invoice_terms" class="control-label col-lg-4 col-sm-4"></label>
@ -36,11 +36,11 @@
</div></div>
{{ Former::legend('Custom Messages') }}
{{ Former::textarea('invoice_terms')->label('Set default invoice terms') }}
{{ Former::textarea('email_footer')->label('Set default email signature') }}
{{ Former::legend('custom_messages') }}
{{ Former::textarea('invoice_terms')->label(trans('texts.default_invoice_terms')) }}
{{ Former::textarea('email_footer')->label(trans('texts.default_email_footer')) }}
{{ Former::actions( Button::lg_success_submit('Save')->append_with_icon('floppy-disk') ) }}
{{ Former::actions( Button::lg_success_submit(trans('texts.save'))->append_with_icon('floppy-disk') ) }}
{{ Former::close() }}
@stop

View File

@ -11,13 +11,13 @@
{{ Former::text('id')->value($client->public_id) }}
</div>
{{ DropdownButton::normal('Edit Client',
{{ DropdownButton::normal(trans('texts.edit_client'),
Navigation::links(
[
['Edit Client', URL::to('clients/' . $client->public_id . '/edit')],
[trans('texts.edit_client'), URL::to('clients/' . $client->public_id . '/edit')],
[Navigation::DIVIDER],
['Archive Client', "javascript:onArchiveClick()"],
['Delete Client', "javascript:onDeleteClick()"],
[trans('texts.archive_client'), "javascript:onArchiveClick()"],
[trans('texts.delete_client'), "javascript:onDeleteClick()"],
]
)
, ['id'=>'normalDropDown'])->split(); }}
@ -25,9 +25,9 @@
{{ DropdownButton::primary('Create Invoice',
Navigation::links(
[
['Create Invoice', URL::to('invoices/create/' . $client->public_id )],
['Enter Payment', URL::to('payments/create/' . $client->public_id )],
['Enter Credit', URL::to('credits/create/' . $client->public_id )],
[trans('texts.create_invoice'), URL::to('invoices/create/' . $client->public_id )],
[trans('texts.enter_payment'), URL::to('payments/create/' . $client->public_id )],
[trans('texts.enter_credit'), URL::to('credits/create/' . $client->public_id )],
]
)
, ['id'=>'primaryDropDown'])->split(); }}
@ -39,43 +39,43 @@
<h2>{{ $client->getDisplayName() }}</h2>
@if ($client->last_login > 0)
<h3 style="margin-top:0px"><small>
Last logged in {{ Utils::timestampToDateTimeString(strtotime($client->last_login)); }}
{{ trans('texts.last_logged_in') }} {{ Utils::timestampToDateTimeString(strtotime($client->last_login)); }}
</small></h3>
@endif
<div class="row">
<div class="col-md-3">
<h3>Details</h3>
<h3>{{ trans('texts.details') }}</h3>
<p>{{ $client->getAddress() }}</p>
<p>{{ $client->getPhone() }}</p>
<p>{{ $client->getNotes() }}</p>
<p>{{ $client->getIndustry() }}</p>
<p>{{ $client->getWebsite() }}</p>
<p>{{ $client->payment_terms ? "Payment terms: Net " . $client->payment_terms : '' }}</p>
<p>{{ $client->payment_terms ? trans('texts.payment_terms') . ": Net " . $client->payment_terms : '' }}</p>
</div>
<div class="col-md-3">
<h3>Contacts</h3>
<h3>{{ trans('texts.contacts') }}</h3>
@foreach ($client->contacts as $contact)
{{ $contact->getDetails() }}
@endforeach
</div>
<div class="col-md-6">
<h3>Standing
<h3>{{ trans('texts.standing') }}
<table class="table" style="width:300px">
<tr>
<td><small>Paid to Date</small></td>
<td><small>{{ trans('texts.paid_to_date') }}</small></td>
<td style="text-align: right">{{ Utils::formatMoney($client->paid_to_date, $client->currency_id); }}</td>
</tr>
<tr>
<td><small>Balance</small></td>
<td><small>{{ trans('texts.balance') }}</small></td>
<td style="text-align: right">{{ Utils::formatMoney($client->balance, $client->currency_id); }}</td>
</tr>
@if ($credit > 0)
<tr>
<td><small>Credit</small></td>
<td><small>{{ trans('texts.credit') }}</small></td>
<td style="text-align: right">{{ Utils::formatMoney($credit, $client->currency_id); }}</td>
</tr>
@endif
@ -88,10 +88,10 @@
<p>&nbsp;</p>
<ul class="nav nav-tabs nav-justified">
{{ HTML::tab_link('#activity', 'Activity', true) }}
{{ HTML::tab_link('#invoices', 'Invoices') }}
{{ HTML::tab_link('#payments', 'Payments') }}
{{ HTML::tab_link('#credits', 'Credits') }}
{{ HTML::tab_link('#activity', trans('texts.activity'), true) }}
{{ HTML::tab_link('#invoices', trans('texts.invoices')) }}
{{ HTML::tab_link('#payments', trans('texts.payments')) }}
{{ HTML::tab_link('#credits', trans('texts.credits')) }}
</ul>
<div class="tab-content">
@ -99,7 +99,11 @@
<div class="tab-pane active" id="activity">
{{ Datatable::table()
->addColumn('Date', 'Message', 'Balance', 'Adjustment')
->addColumn(
trans('texts.date'),
trans('texts.message'),
trans('texts.balance'),
trans('texts.adjustment'))
->setUrl(url('api/activities/'. $client->public_id))
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
@ -112,7 +116,11 @@
@if ($hasRecurringInvoices)
{{ Datatable::table()
->addColumn('How Often', 'Start Date', 'End Date', 'Invoice Total')
->addColumn(
trans('texts.frequency_id'),
trans('texts.start_date'),
trans('texts.end_date'),
trans('texts.invoice_total'))
->setUrl(url('api/recurring_invoices/' . $client->public_id))
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
@ -121,7 +129,13 @@
@endif
{{ Datatable::table()
->addColumn('Invoice Number', 'Invoice Date', 'Invoice Total', 'Balance Due', 'Due Date', 'Status')
->addColumn(
trans('texts.invoice_number'),
trans('texts.invoice_date'),
trans('texts.invoice_total'),
trans('texts.balance_due'),
trans('texts.due_date'),
trans('texts.status'))
->setUrl(url('api/invoices/' . $client->public_id))
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
@ -132,7 +146,12 @@
<div class="tab-pane" id="payments">
{{ Datatable::table()
->addColumn('Invoice', 'Transaction Reference', 'Method', 'Payment Amount', 'Payment Date')
->addColumn(
trans('texts.invoice'),
trans('texts.transaction_reference'),
trans('texts.method'),
trans('texts.payment_amount'),
trans('texts.payment_date'))
->setUrl(url('api/payments/' . $client->public_id))
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
@ -143,7 +162,11 @@
<div class="tab-pane" id="credits">
{{ Datatable::table()
->addColumn('Credit Amount', 'Credit Balance', 'Credit Date', 'Private Notes')
->addColumn(
trans('texts.credit_amount'),
trans('texts.credit_balance'),
trans('texts.credit_date'),
trans('texts.private_notes'))
->setUrl(url('api/credits/' . $client->public_id))
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
@ -170,7 +193,7 @@
}
function onDeleteClick() {
if (confirm('Are you sure you want to delete this client?')) {
if (confirm("{{ trans('texts.are_you_sure') }}")) {
$('#action').val('delete');
$('.mainForm').submit();
}

View File

@ -19,7 +19,7 @@
{{ Former::select('client')->addOption('', '')->addGroupClass('client-select') }}
{{ Former::text('amount') }}
{{ Former::text('credit_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('<i class="glyphicon glyphicon-calendar"></i>') }}
{{-- Former::select('currency_id')->addOption('','')->label('Currency')
{{-- Former::select('currency_id')->addOption('','')
->fromQuery($currencies, 'name', 'id')->select(Session::get(SESSION_CURRENCY, DEFAULT_CURRENCY)) --}}
{{ Former::textarea('private_notes') }}
@ -29,8 +29,8 @@
</div>
</div>
<center class="buttons">
{{ Button::lg_primary_submit_success('Save')->append_with_icon('floppy-disk') }}
{{ Button::lg_default_link('credits/' . ($credit ? $credit->public_id : ''), 'Cancel')->append_with_icon('remove-circle'); }}
{{ Button::lg_primary_submit_success(trans('texts.save'))->append_with_icon('floppy-disk') }}
{{ Button::lg_default_link('credits/' . ($credit ? $credit->public_id : ''), trans('texts.cancel'))->append_with_icon('remove-circle'); }}
</center>
{{ Former::close() }}
@ -54,10 +54,7 @@
$clientSelect.combobox();
$('#currency_id').combobox();
$('#credit_date').datepicker('update', new Date({{ strtotime(Utils::today()) * 1000 }}));
});

View File

@ -20,10 +20,10 @@
{{ Former::select('client')->addOption('', '')->addGroupClass('client-select') }}
{{ Former::select('invoice')->addOption('', '')->addGroupClass('invoice-select') }}
{{ Former::text('amount') }}
{{ Former::select('payment_type_id')->addOption('','')->label('Payment type')
{{ Former::select('payment_type_id')->addOption('','')
->fromQuery($paymentTypes, 'name', 'id') }}
{{ Former::text('payment_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('<i class="glyphicon glyphicon-calendar"></i>') }}
{{-- Former::select('currency_id')->addOption('','')->label('Currency')
{{-- Former::select('currency_id')->addOption('','')
->fromQuery($currencies, 'name', 'id')->select(Session::get(SESSION_CURRENCY, DEFAULT_CURRENCY)) --}}
</div>
@ -33,8 +33,8 @@
</div>
<center class="buttons">
{{ Button::lg_primary_submit_success('Save')->append_with_icon('floppy-disk') }}
{{ Button::lg_default_link('payments/' . ($payment ? $payment->public_id : ''), 'Cancel')->append_with_icon('remove-circle'); }}
{{ Button::lg_primary_submit_success(trans('texts.save'))->append_with_icon('floppy-disk') }}
{{ Button::lg_default_link('payments/' . ($payment ? $payment->public_id : ''), trans('texts.cancel'))->append_with_icon('remove-circle'); }}
</center>
{{ Former::close() }}
@ -49,7 +49,6 @@
populateInvoiceComboboxes({{ $clientPublicId }}, {{ $invoicePublicId }});
$('#payment_type_id').combobox();
$('#payment_date').datepicker('update', new Date({{ strtotime(Utils::today()) * 1000 }}));
});