mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Bug fixes
This commit is contained in:
parent
9341ea0c87
commit
3f1891fa3b
@ -134,13 +134,14 @@ class PaymentController extends BaseController
|
||||
if ($paymentType) {
|
||||
$paymentType = 'PAYMENT_TYPE_' . strtoupper($paymentType);
|
||||
} else {
|
||||
$paymentType = Session::get('payment_type', $account->account_gateways[0]->getPaymentType());
|
||||
$paymentType = Session::get($invitation->id . 'payment_type') ?:
|
||||
$account->account_gateways[0]->getPaymentType();
|
||||
}
|
||||
if ($paymentType == PAYMENT_TYPE_TOKEN) {
|
||||
$useToken = true;
|
||||
$paymentType = PAYMENT_TYPE_CREDIT_CARD;
|
||||
}
|
||||
Session::put('payment_type', $paymentType);
|
||||
Session::put($invitation->id . 'payment_type', $paymentType);
|
||||
|
||||
$accountGateway = $invoice->client->account->getGatewayByType($paymentType);
|
||||
$gateway = $accountGateway->gateway;
|
||||
@ -210,7 +211,7 @@ class PaymentController extends BaseController
|
||||
|
||||
$account = $this->accountRepo->getNinjaAccount();
|
||||
$account->load('account_gateways.gateway');
|
||||
$accountGateway = $account->getGatewayByType(Session::get('payment_type'));
|
||||
$accountGateway = $account->getGatewayByType(PAYMENT_TYPE_CREDIT_CARD);
|
||||
$gateway = $accountGateway->gateway;
|
||||
$acceptedCreditCardTypes = $accountGateway->getCreditcardTypes();
|
||||
|
||||
@ -345,7 +346,7 @@ class PaymentController extends BaseController
|
||||
$invoice = $invitation->invoice;
|
||||
$client = $invoice->client;
|
||||
$account = $client->account;
|
||||
$accountGateway = $account->getGatewayByType(Session::get('payment_type'));
|
||||
$accountGateway = $account->getGatewayByType(Session::get($invitation->id . 'payment_type'));
|
||||
|
||||
$rules = [
|
||||
'first_name' => 'required',
|
||||
@ -449,7 +450,7 @@ class PaymentController extends BaseController
|
||||
}
|
||||
|
||||
if ($response->isSuccessful()) {
|
||||
$payment = $this->paymentService->createPayment($invitation, $ref);
|
||||
$payment = $this->paymentService->createPayment($invitation, $accountGateway, $ref);
|
||||
Session::flash('message', trans('texts.applied_payment'));
|
||||
|
||||
if ($account->account_key == NINJA_ACCOUNT_KEY) {
|
||||
@ -496,7 +497,7 @@ class PaymentController extends BaseController
|
||||
$client = $invoice->client;
|
||||
$account = $client->account;
|
||||
|
||||
$accountGateway = $account->getGatewayByType(Session::get('payment_type'));
|
||||
$accountGateway = $account->getGatewayByType(Session::get($invitation->id . 'payment_type'));
|
||||
$gateway = $this->paymentService->createGateway($accountGateway);
|
||||
|
||||
// Check for Dwolla payment error
|
||||
@ -520,14 +521,14 @@ class PaymentController extends BaseController
|
||||
if ($response->isCancelled()) {
|
||||
// do nothing
|
||||
} elseif ($response->isSuccessful()) {
|
||||
$payment = $this->paymentService->createPayment($invitation, $ref, $payerId);
|
||||
$payment = $this->paymentService->createPayment($invitation, $accountGateway, $ref, $payerId);
|
||||
Session::flash('message', trans('texts.applied_payment'));
|
||||
} else {
|
||||
$this->error('offsite', $response->getMessage(), $accountGateway);
|
||||
}
|
||||
return Redirect::to($invitation->getLink());
|
||||
} else {
|
||||
$payment = $this->paymentService->createPayment($invitation, $token, $payerId);
|
||||
$payment = $this->paymentService->createPayment($invitation, $accountGateway, $token, $payerId);
|
||||
Session::flash('message', trans('texts.applied_payment'));
|
||||
|
||||
return Redirect::to($invitation->getLink());
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
|
||||
*/
|
||||
|
||||
//Cache::flush();
|
||||
//Crypt::decrypt();
|
||||
//apc_clear_cache();
|
||||
//dd(DB::getQueryLog());
|
||||
//dd(Client::getPrivateId(1));
|
||||
@ -433,7 +433,7 @@ if (!defined('CONTACT_EMAIL')) {
|
||||
define('NINJA_GATEWAY_CONFIG', 'NINJA_GATEWAY_CONFIG');
|
||||
define('NINJA_WEB_URL', 'https://www.invoiceninja.com');
|
||||
define('NINJA_APP_URL', 'https://app.invoiceninja.com');
|
||||
define('NINJA_VERSION', '2.4.7');
|
||||
define('NINJA_VERSION', '2.4.8');
|
||||
define('NINJA_DATE', '2000-01-01');
|
||||
|
||||
define('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja');
|
||||
|
@ -459,6 +459,12 @@ class Account extends Eloquent
|
||||
return $isQuote && !$this->share_counter ? $this->quote_number_counter : $this->invoice_number_counter;
|
||||
}
|
||||
|
||||
public function previewNextInvoiceNumber($entityType = ENTITY_INVOICE)
|
||||
{
|
||||
$invoice = $this->createInvoice($entityType);
|
||||
return $this->getNextInvoiceNumber($invoice);
|
||||
}
|
||||
|
||||
public function getNextInvoiceNumber($invoice)
|
||||
{
|
||||
if ($this->hasNumberPattern($invoice->is_quote)) {
|
||||
|
@ -440,7 +440,10 @@ class InvoiceRepository extends BaseRepository
|
||||
$invoiceNumber = substr($invoiceNumber, strlen($account->quote_number_prefix));
|
||||
}
|
||||
$invoiceNumber = $account->invoice_number_prefix.$invoiceNumber;
|
||||
if (Invoice::scope()->withTrashed()->whereInvoiceNumber($invoiceNumber)->first()) {
|
||||
if (Invoice::scope(false, $account->id)
|
||||
->withTrashed()
|
||||
->whereInvoiceNumber($invoiceNumber)
|
||||
->first()) {
|
||||
$invoiceNumber = false;
|
||||
}
|
||||
}
|
||||
|
@ -184,10 +184,9 @@ class PaymentService extends BaseService
|
||||
return $cardReference;
|
||||
}
|
||||
|
||||
public function createPayment($invitation, $ref, $payerId = null)
|
||||
public function createPayment($invitation, $accountGateway, $ref, $payerId = null)
|
||||
{
|
||||
$invoice = $invitation->invoice;
|
||||
$accountGateway = $invoice->client->account->getGatewayByType(Session::get('payment_type'));
|
||||
|
||||
// sync pro accounts
|
||||
if ($invoice->account->account_key == NINJA_ACCOUNT_KEY
|
||||
@ -257,7 +256,7 @@ class PaymentService extends BaseService
|
||||
$ref = $response->getTransactionReference();
|
||||
|
||||
// create payment record
|
||||
return $this->createPayment($invitation, $ref);
|
||||
return $this->createPayment($invitation, $accountGateway, $ref);
|
||||
}
|
||||
|
||||
public function getDatatable($clientPublicId, $search)
|
||||
|
@ -14,7 +14,7 @@ class AddCustomDesign extends Migration {
|
||||
{
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->text('custom_design')->nullable();
|
||||
$table->mediumText('custom_design')->nullable();
|
||||
});
|
||||
|
||||
DB::table('invoice_designs')->insert(['id' => CUSTOM_DESIGN, 'name' => 'Custom']);
|
||||
|
@ -119,12 +119,14 @@ class PaymentLibrariesSeeder extends Seeder
|
||||
['name' => 'Chinese Renminbi', 'code' => 'CNY', 'symbol' => 'RMB ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
['name' => 'Rwandan Franc', 'code' => 'RWF', 'symbol' => 'RF ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
['name' => 'Tanzanian Shilling', 'code' => 'TZS', 'symbol' => 'TSh ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
['name' => 'Netherlands Antillean Guilder', 'code' => 'ANG', 'symbol' => 'ANG ', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','],
|
||||
];
|
||||
|
||||
foreach ($currencies as $currency) {
|
||||
$record = Currency::whereCode($currency['code'])->first();
|
||||
if ($record) {
|
||||
$record->name = $currency['name'];
|
||||
$record->symbol = $currency['symbol'];
|
||||
$record->thousand_separator = $currency['thousand_separator'];
|
||||
$record->decimal_separator = $currency['decimal_separator'];
|
||||
$record->save();
|
||||
|
@ -5,6 +5,8 @@
|
||||
# Invoice Ninja
|
||||
### [https://www.invoiceninja.com](https://www.invoiceninja.com)
|
||||
|
||||
We're starting to work on our expenses, vendors and receipts module. If you'd like to help us design it please send us an email to join the discussion.
|
||||
|
||||
[](https://gitter.im/hillelcoren/invoice-ninja?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
### Referral Program
|
||||
|
@ -967,7 +967,7 @@
|
||||
'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.',
|
||||
'quote_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the quote number.',
|
||||
'custom_client_fields_helps' => 'Add a text input to the client create/edit page and display the label and value on the PDF.',
|
||||
'custom_account_fields_helps' => 'Add the label and value to the company details section of the PDF.',
|
||||
'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.',
|
||||
'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.',
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
@ -977,6 +977,9 @@
|
||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||
'confirm' => 'Confirm',
|
||||
'email_preferences' => 'Email Preferences',
|
||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||
'next_invoice_number' => 'The next invoice number is :number.',
|
||||
'next_quote_number' => 'The next quote number is :number.',
|
||||
|
||||
|
||||
);
|
||||
|
@ -969,7 +969,7 @@ return array(
|
||||
'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.',
|
||||
'quote_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the quote number.',
|
||||
'custom_client_fields_helps' => 'Add a text input to the client create/edit page and display the label and value on the PDF.',
|
||||
'custom_account_fields_helps' => 'Add the label and value to the company details section of the PDF.',
|
||||
'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.',
|
||||
'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.',
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
@ -979,5 +979,8 @@ return array(
|
||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||
'confirm' => 'Confirm',
|
||||
'email_preferences' => 'Email Preferences',
|
||||
|
||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||
'next_invoice_number' => 'The next invoice number is :number.',
|
||||
'next_quote_number' => 'The next quote number is :number.',
|
||||
|
||||
);
|
||||
|
@ -970,7 +970,7 @@ return array(
|
||||
'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.',
|
||||
'quote_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the quote number.',
|
||||
'custom_client_fields_helps' => 'Add a text input to the client create/edit page and display the label and value on the PDF.',
|
||||
'custom_account_fields_helps' => 'Add the label and value to the company details section of the PDF.',
|
||||
'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.',
|
||||
'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.',
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
@ -980,7 +980,8 @@ return array(
|
||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||
'confirm' => 'Confirm',
|
||||
'email_preferences' => 'Email Preferences',
|
||||
|
||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||
'next_invoice_number' => 'The next invoice number is :number.',
|
||||
'next_quote_number' => 'The next quote number is :number.',
|
||||
|
||||
);
|
||||
|
@ -945,7 +945,7 @@ return array(
|
||||
'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.',
|
||||
'quote_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the quote number.',
|
||||
'custom_client_fields_helps' => 'Add a text input to the client create/edit page and display the label and value on the PDF.',
|
||||
'custom_account_fields_helps' => 'Add the label and value to the company details section of the PDF.',
|
||||
'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.',
|
||||
'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.',
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
@ -955,5 +955,8 @@ return array(
|
||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||
'confirm' => 'Confirm',
|
||||
'email_preferences' => 'Email Preferences',
|
||||
|
||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||
'next_invoice_number' => 'The next invoice number is :number.',
|
||||
'next_quote_number' => 'The next quote number is :number.',
|
||||
|
||||
);
|
||||
|
@ -966,7 +966,7 @@ return array(
|
||||
'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.',
|
||||
'quote_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the quote number.',
|
||||
'custom_client_fields_helps' => 'Add a text input to the client create/edit page and display the label and value on the PDF.',
|
||||
'custom_account_fields_helps' => 'Add the label and value to the company details section of the PDF.',
|
||||
'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.',
|
||||
'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.',
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
@ -976,6 +976,8 @@ return array(
|
||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||
'confirm' => 'Confirm',
|
||||
'email_preferences' => 'Email Preferences',
|
||||
|
||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||
'next_invoice_number' => 'The next invoice number is :number.',
|
||||
'next_quote_number' => 'The next quote number is :number.',
|
||||
|
||||
);
|
||||
|
@ -960,7 +960,7 @@ return array(
|
||||
'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.',
|
||||
'quote_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the quote number.',
|
||||
'custom_client_fields_helps' => 'Add a text input to the client create/edit page and display the label and value on the PDF.',
|
||||
'custom_account_fields_helps' => 'Add the label and value to the company details section of the PDF.',
|
||||
'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.',
|
||||
'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.',
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
@ -970,6 +970,8 @@ return array(
|
||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||
'confirm' => 'Confirm',
|
||||
'email_preferences' => 'Email Preferences',
|
||||
|
||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||
'next_invoice_number' => 'The next invoice number is :number.',
|
||||
'next_quote_number' => 'The next quote number is :number.',
|
||||
|
||||
);
|
||||
|
@ -960,7 +960,7 @@ return array(
|
||||
'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.',
|
||||
'quote_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the quote number.',
|
||||
'custom_client_fields_helps' => 'Add a text input to the client create/edit page and display the label and value on the PDF.',
|
||||
'custom_account_fields_helps' => 'Add the label and value to the company details section of the PDF.',
|
||||
'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.',
|
||||
'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.',
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
@ -970,6 +970,8 @@ return array(
|
||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||
'confirm' => 'Confirm',
|
||||
'email_preferences' => 'Email Preferences',
|
||||
|
||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||
'next_invoice_number' => 'The next invoice number is :number.',
|
||||
'next_quote_number' => 'The next quote number is :number.',
|
||||
|
||||
);
|
||||
|
@ -962,7 +962,7 @@ return array(
|
||||
'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.',
|
||||
'quote_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the quote number.',
|
||||
'custom_client_fields_helps' => 'Add a text input to the client create/edit page and display the label and value on the PDF.',
|
||||
'custom_account_fields_helps' => 'Add the label and value to the company details section of the PDF.',
|
||||
'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.',
|
||||
'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.',
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
@ -972,6 +972,8 @@ return array(
|
||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||
'confirm' => 'Confirm',
|
||||
'email_preferences' => 'Email Preferences',
|
||||
|
||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||
'next_invoice_number' => 'The next invoice number is :number.',
|
||||
'next_quote_number' => 'The next quote number is :number.',
|
||||
|
||||
);
|
||||
|
@ -969,7 +969,7 @@ return array(
|
||||
'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.',
|
||||
'quote_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the quote number.',
|
||||
'custom_client_fields_helps' => 'Add a text input to the client create/edit page and display the label and value on the PDF.',
|
||||
'custom_account_fields_helps' => 'Add the label and value to the company details section of the PDF.',
|
||||
'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.',
|
||||
'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.',
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
@ -979,7 +979,9 @@ return array(
|
||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||
'confirm' => 'Confirm',
|
||||
'email_preferences' => 'Email Preferences',
|
||||
|
||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||
'next_invoice_number' => 'The next invoice number is :number.',
|
||||
'next_quote_number' => 'The next quote number is :number.',
|
||||
|
||||
);
|
||||
|
||||
|
@ -967,7 +967,7 @@ return array(
|
||||
'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.',
|
||||
'quote_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the quote number.',
|
||||
'custom_client_fields_helps' => 'Add a text input to the client create/edit page and display the label and value on the PDF.',
|
||||
'custom_account_fields_helps' => 'Add the label and value to the company details section of the PDF.',
|
||||
'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.',
|
||||
'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.',
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
@ -977,5 +977,8 @@ return array(
|
||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||
'confirm' => 'Confirm',
|
||||
'email_preferences' => 'Email Preferences',
|
||||
|
||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||
'next_invoice_number' => 'The next invoice number is :number.',
|
||||
'next_quote_number' => 'The next quote number is :number.',
|
||||
|
||||
);
|
||||
|
@ -963,7 +963,7 @@ return array(
|
||||
'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.',
|
||||
'quote_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the quote number.',
|
||||
'custom_client_fields_helps' => 'Add a text input to the client create/edit page and display the label and value on the PDF.',
|
||||
'custom_account_fields_helps' => 'Add the label and value to the company details section of the PDF.',
|
||||
'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.',
|
||||
'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.',
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
@ -973,5 +973,8 @@ return array(
|
||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||
'confirm' => 'Confirm',
|
||||
'email_preferences' => 'Email Preferences',
|
||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||
'next_invoice_number' => 'The next invoice number is :number.',
|
||||
'next_quote_number' => 'The next quote number is :number.',
|
||||
|
||||
);
|
||||
|
@ -959,7 +959,7 @@ return array(
|
||||
'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.',
|
||||
'quote_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the quote number.',
|
||||
'custom_client_fields_helps' => 'Add a text input to the client create/edit page and display the label and value on the PDF.',
|
||||
'custom_account_fields_helps' => 'Add the label and value to the company details section of the PDF.',
|
||||
'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.',
|
||||
'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.',
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
@ -969,5 +969,8 @@ return array(
|
||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||
'confirm' => 'Confirm',
|
||||
'email_preferences' => 'Email Preferences',
|
||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||
'next_invoice_number' => 'The next invoice number is :number.',
|
||||
'next_quote_number' => 'The next quote number is :number.',
|
||||
|
||||
);
|
||||
|
@ -964,7 +964,7 @@ return array(
|
||||
'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.',
|
||||
'quote_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the quote number.',
|
||||
'custom_client_fields_helps' => 'Add a text input to the client create/edit page and display the label and value on the PDF.',
|
||||
'custom_account_fields_helps' => 'Add the label and value to the company details section of the PDF.',
|
||||
'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.',
|
||||
'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.',
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
@ -974,5 +974,8 @@ return array(
|
||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||
'confirm' => 'Confirm',
|
||||
'email_preferences' => 'Email Preferences',
|
||||
'created_invoices' => 'Successfully created :count invoice(s)',
|
||||
'next_invoice_number' => 'The next invoice number is :number.',
|
||||
'next_quote_number' => 'The next quote number is :number.',
|
||||
|
||||
);
|
||||
|
@ -19,16 +19,7 @@
|
||||
|
||||
|
||||
{{-- Former::select('recurring_hour')->options($recurringHours) --}}
|
||||
|
||||
{!! Former::select('email_design_id')
|
||||
->style('width: 200px')
|
||||
->addOption(trans('texts.plain'), 1)
|
||||
->addOption(trans('texts.light'), 2)
|
||||
->addOption(trans('texts.dark'), 3)
|
||||
->help(trans('texts.email_design_help')) !!}
|
||||
|
||||
|
||||
|
||||
{!! Former::inline_radios('custom_invoice_link')
|
||||
->onchange('onCustomLinkChange()')
|
||||
->label(trans('texts.invoice_link'))
|
||||
@ -51,7 +42,25 @@
|
||||
->addGroupClass('iframe_url')
|
||||
->label(' ')
|
||||
->help(trans('texts.subdomain_help')) !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{!! trans('texts.email_design') !!}</h3>
|
||||
</div>
|
||||
<div class="panel-body form-padding-right">
|
||||
|
||||
{!! Former::select('email_design_id')
|
||||
->style('width: 200px')
|
||||
->addOption(trans('texts.plain'), 1)
|
||||
->addOption(trans('texts.light'), 2)
|
||||
->addOption(trans('texts.dark'), 3)
|
||||
->help(trans('texts.email_design_help')) !!}
|
||||
|
||||
|
||||
|
||||
@if (Utils::isNinja())
|
||||
{!! Former::checkbox('enable_email_markup')
|
||||
->text(trans('texts.enable') .
|
||||
|
@ -59,7 +59,8 @@
|
||||
->addGroupClass('number-pattern') !!}
|
||||
{!! Former::text('invoice_number_counter')
|
||||
->label(trans('texts.counter'))
|
||||
->help(trans('texts.invoice_number_help')) !!}
|
||||
->help(trans('texts.invoice_number_help') . ' ' .
|
||||
trans('texts.next_invoice_number', ['number' => $account->previewNextInvoiceNumber()])) !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -86,7 +87,8 @@
|
||||
->addGroupClass('pad-checkbox')
|
||||
->append(Former::checkbox('share_counter')->raw()
|
||||
->onclick('setQuoteNumberEnabled()') . ' ' . trans('texts.share_invoice_counter'))
|
||||
->help(trans('texts.quote_number_help')) !!}
|
||||
->help(trans('texts.quote_number_help') . ' ' .
|
||||
trans('texts.next_quote_number', ['number' => $account->previewNextInvoiceNumber(ENTITY_QUOTE)])) !!}
|
||||
|
||||
|
||||
</div>
|
||||
|
@ -1132,8 +1132,8 @@
|
||||
return;
|
||||
@endif
|
||||
var number = '{{ $account->getNumberPattern($invoice) }}';
|
||||
number = number.replace('{$custom1}', client.custom_value1);
|
||||
number = number.replace('{$custom2}', client.custom_value2);
|
||||
number = number.replace('{$custom1}', client.custom_value1 ? client.custom_value1 : '');
|
||||
number = number.replace('{$custom2}', client.custom_value2 ? client.custom_value1 : '');
|
||||
model.invoice().invoice_number(number);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user