mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
update from master
This commit is contained in:
parent
6133c6ff07
commit
bcffedcbd3
@ -124,12 +124,8 @@ class InvoiceController extends BaseController
|
|||||||
$invoice->invoice_date = Utils::fromSqlDate($invoice->invoice_date);
|
$invoice->invoice_date = Utils::fromSqlDate($invoice->invoice_date);
|
||||||
$invoice->due_date = Utils::fromSqlDate($invoice->due_date);
|
$invoice->due_date = Utils::fromSqlDate($invoice->due_date);
|
||||||
$invoice->is_pro = $account->isPro();
|
$invoice->is_pro = $account->isPro();
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
=======
|
|
||||||
$invoice->invoice_fonts = $account->getFontsData();
|
$invoice->invoice_fonts = $account->getFontsData();
|
||||||
|
|
||||||
>>>>>>> cf24684adbce402f1c0e266672c4a2a5767dc754
|
|
||||||
if ($invoice->invoice_design_id == CUSTOM_DESIGN) {
|
if ($invoice->invoice_design_id == CUSTOM_DESIGN) {
|
||||||
$invoice->invoice_design->javascript = $account->custom_design;
|
$invoice->invoice_design->javascript = $account->custom_design;
|
||||||
} else {
|
} else {
|
||||||
@ -364,7 +360,7 @@ class InvoiceController extends BaseController
|
|||||||
$recurringHelp .= $line;
|
$recurringHelp .= $line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$recurringDueDateHelp = '';
|
$recurringDueDateHelp = '';
|
||||||
foreach (preg_split("/((\r?\n)|(\r\n?))/", trans('texts.recurring_due_date_help')) as $line) {
|
foreach (preg_split("/((\r?\n)|(\r\n?))/", trans('texts.recurring_due_date_help')) as $line) {
|
||||||
$parts = explode("=>", $line);
|
$parts = explode("=>", $line);
|
||||||
@ -380,20 +376,20 @@ class InvoiceController extends BaseController
|
|||||||
$recurringDueDates = array(
|
$recurringDueDates = array(
|
||||||
trans('texts.use_client_terms') => array('value' => '', 'class' => 'monthly weekly'),
|
trans('texts.use_client_terms') => array('value' => '', 'class' => 'monthly weekly'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$ends = array('th','st','nd','rd','th','th','th','th','th','th');
|
$ends = array('th','st','nd','rd','th','th','th','th','th','th');
|
||||||
for($i = 1; $i < 31; $i++){
|
for($i = 1; $i < 31; $i++){
|
||||||
if ($i >= 11 && $i <= 13) $ordinal = $i. 'th';
|
if ($i >= 11 && $i <= 13) $ordinal = $i. 'th';
|
||||||
else $ordinal = $i . $ends[$i % 10];
|
else $ordinal = $i . $ends[$i % 10];
|
||||||
|
|
||||||
$dayStr = str_pad($i, 2, '0', STR_PAD_LEFT);
|
$dayStr = str_pad($i, 2, '0', STR_PAD_LEFT);
|
||||||
$str = trans('texts.day_of_month', array('ordinal'=>$ordinal));
|
$str = trans('texts.day_of_month', array('ordinal'=>$ordinal));
|
||||||
|
|
||||||
$recurringDueDates[$str] = array('value' => "1998-01-$dayStr", 'data-num' => $i, 'class' => 'monthly');
|
$recurringDueDates[$str] = array('value' => "1998-01-$dayStr", 'data-num' => $i, 'class' => 'monthly');
|
||||||
}
|
}
|
||||||
$recurringDueDates[trans('texts.last_day_of_month')] = array('value' => "1998-01-31", 'data-num' => 31, 'class' => 'monthly');
|
$recurringDueDates[trans('texts.last_day_of_month')] = array('value' => "1998-01-31", 'data-num' => 31, 'class' => 'monthly');
|
||||||
|
|
||||||
|
|
||||||
$daysOfWeek = array(
|
$daysOfWeek = array(
|
||||||
trans('texts.sunday'),
|
trans('texts.sunday'),
|
||||||
trans('texts.monday'),
|
trans('texts.monday'),
|
||||||
@ -406,13 +402,13 @@ class InvoiceController extends BaseController
|
|||||||
foreach(array('1st','2nd','3rd','4th') as $i=>$ordinal){
|
foreach(array('1st','2nd','3rd','4th') as $i=>$ordinal){
|
||||||
foreach($daysOfWeek as $j=>$dayOfWeek){
|
foreach($daysOfWeek as $j=>$dayOfWeek){
|
||||||
$str = trans('texts.day_of_week_after', array('ordinal' => $ordinal, 'day' => $dayOfWeek));
|
$str = trans('texts.day_of_week_after', array('ordinal' => $ordinal, 'day' => $dayOfWeek));
|
||||||
|
|
||||||
$day = $i * 7 + $j + 1;
|
$day = $i * 7 + $j + 1;
|
||||||
$dayStr = str_pad($day, 2, '0', STR_PAD_LEFT);
|
$dayStr = str_pad($day, 2, '0', STR_PAD_LEFT);
|
||||||
$recurringDueDates[$str] = array('value' => "1998-02-$dayStr", 'data-num' => $day, 'class' => 'weekly');
|
$recurringDueDates[$str] = array('value' => "1998-02-$dayStr", 'data-num' => $day, 'class' => 'weekly');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'data' => Input::old('data'),
|
'data' => Input::old('data'),
|
||||||
'account' => Auth::user()->account->load('country'),
|
'account' => Auth::user()->account->load('country'),
|
||||||
|
@ -992,7 +992,7 @@ return array(
|
|||||||
'custom_account_fields_helps' => 'Add a 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_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.',
|
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||||
|
|
||||||
'token_expired' => 'Validation token was expired. Please try again.',
|
'token_expired' => 'Validation token was expired. Please try again.',
|
||||||
'invoice_link' => 'Invoice Link',
|
'invoice_link' => 'Invoice Link',
|
||||||
'button_confirmation_message' => 'Click to confirm your email address.',
|
'button_confirmation_message' => 'Click to confirm your email address.',
|
||||||
@ -1012,7 +1012,7 @@ return array(
|
|||||||
|
|
||||||
'white_label_custom_css' => ':link for $'.WHITE_LABEL_PRICE.' to enable custom styling and help support our project.',
|
'white_label_custom_css' => ':link for $'.WHITE_LABEL_PRICE.' to enable custom styling and help support our project.',
|
||||||
'white_label_purchase_link' => 'Purchase a white label license',
|
'white_label_purchase_link' => 'Purchase a white label license',
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
// Expense / vendor
|
// Expense / vendor
|
||||||
'expense' => 'Expense',
|
'expense' => 'Expense',
|
||||||
@ -1061,9 +1061,8 @@ return array(
|
|||||||
'edit_payment_terms' => 'Edit payment term',
|
'edit_payment_terms' => 'Edit payment term',
|
||||||
'edit_payment_term' => 'Edit payment term',
|
'edit_payment_term' => 'Edit payment term',
|
||||||
'archive_payment_term' => 'Archive payment term',
|
'archive_payment_term' => 'Archive payment term',
|
||||||
);
|
|
||||||
=======
|
|
||||||
|
|
||||||
// recurring due dates
|
// recurring due dates
|
||||||
'recurring_due_dates' => 'Recurring Invoice Due Dates',
|
'recurring_due_dates' => 'Recurring Invoice Due Dates',
|
||||||
'recurring_due_date_help' => '<p>Automatically sets a due date for the invoice.</p>
|
'recurring_due_date_help' => '<p>Automatically sets a due date for the invoice.</p>
|
||||||
@ -1106,4 +1105,4 @@ return array(
|
|||||||
'payment_message_button' => 'Thank you for your payment of :amount.',
|
'payment_message_button' => 'Thank you for your payment of :amount.',
|
||||||
|
|
||||||
);
|
);
|
||||||
>>>>>>> cf24684adbce402f1c0e266672c4a2a5767dc754
|
|
||||||
|
@ -175,10 +175,10 @@
|
|||||||
@if ($account->showCustomField('custom_invoice_text_label2', $invoice))
|
@if ($account->showCustomField('custom_invoice_text_label2', $invoice))
|
||||||
{!! Former::text('custom_text_value2')->label($account->custom_invoice_text_label2)->data_bind("value: custom_text_value2, valueUpdate: 'afterkeydown'") !!}
|
{!! Former::text('custom_text_value2')->label($account->custom_invoice_text_label2)->data_bind("value: custom_text_value2, valueUpdate: 'afterkeydown'") !!}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($entityType == ENTITY_INVOICE)
|
@if ($entityType == ENTITY_INVOICE)
|
||||||
<div class="form-group" style="margin-bottom: 8px">
|
<div class="form-group" style="margin-bottom: 8px">
|
||||||
<div class="col-lg-8 col-sm-8 col-sm-offset-4" style="padding-top: 10px">
|
<div class="col-lg-8 col-sm-8 col-sm-offset-4" style="padding-top: 10px">
|
||||||
@if ($invoice->recurring_invoice)
|
@if ($invoice->recurring_invoice)
|
||||||
{!! trans('texts.created_by_invoice', ['invoice' => link_to('/invoices/'.$invoice->recurring_invoice->public_id, trans('texts.recurring_invoice'))]) !!}
|
{!! trans('texts.created_by_invoice', ['invoice' => link_to('/invoices/'.$invoice->recurring_invoice->public_id, trans('texts.recurring_invoice'))]) !!}
|
||||||
@elseif ($invoice->id)
|
@elseif ($invoice->id)
|
||||||
@ -628,7 +628,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" id="recurringDueDateModal" tabindex="-1" role="dialog" aria-labelledby="recurringDueDateModalLabel" aria-hidden="true">
|
<div class="modal fade" id="recurringDueDateModal" tabindex="-1" role="dialog" aria-labelledby="recurringDueDateModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog" style="min-width:150px">
|
<div class="modal-dialog" style="min-width:150px">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@ -644,7 +644,7 @@
|
|||||||
<div class="modal-footer" style="margin-top: 0px">
|
<div class="modal-footer" style="margin-top: 0px">
|
||||||
<button type="button" class="btn btn-primary" data-dismiss="modal">{{ trans('texts.close') }}</button>
|
<button type="button" class="btn btn-primary" data-dismiss="modal">{{ trans('texts.close') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -673,7 +673,7 @@
|
|||||||
var $clientSelect = $('select#client');
|
var $clientSelect = $('select#client');
|
||||||
var invoiceDesigns = {!! $invoiceDesigns !!};
|
var invoiceDesigns = {!! $invoiceDesigns !!};
|
||||||
var invoiceFonts = {!! $invoiceFonts !!};
|
var invoiceFonts = {!! $invoiceFonts !!};
|
||||||
|
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
// create client dictionary
|
// create client dictionary
|
||||||
@ -892,20 +892,17 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
applyComboboxListeners();
|
applyComboboxListeners();
|
||||||
<<<<<<< HEAD
|
|
||||||
});
|
});
|
||||||
=======
|
|
||||||
});
|
|
||||||
|
|
||||||
function onFrequencyChange(){
|
function onFrequencyChange(){
|
||||||
var currentName = $('#frequency_id').find('option:selected').text()
|
var currentName = $('#frequency_id').find('option:selected').text()
|
||||||
var currentDueDateNumber = $('#recurring_due_date').find('option:selected').attr('data-num');
|
var currentDueDateNumber = $('#recurring_due_date').find('option:selected').attr('data-num');
|
||||||
var optionClass = currentName && currentName.toLowerCase().indexOf('week') > -1 ? 'weekly' : 'monthly';
|
var optionClass = currentName && currentName.toLowerCase().indexOf('week') > -1 ? 'weekly' : 'monthly';
|
||||||
var replacementOption = $('#recurring_due_date option[data-num=' + currentDueDateNumber + '].' + optionClass);
|
var replacementOption = $('#recurring_due_date option[data-num=' + currentDueDateNumber + '].' + optionClass);
|
||||||
|
|
||||||
$('#recurring_due_date option').hide();
|
$('#recurring_due_date option').hide();
|
||||||
$('#recurring_due_date option.' + optionClass).show();
|
$('#recurring_due_date option.' + optionClass).show();
|
||||||
|
|
||||||
// Switch to an equivalent option
|
// Switch to an equivalent option
|
||||||
if(replacementOption.length){
|
if(replacementOption.length){
|
||||||
replacementOption.attr('selected','selected');
|
replacementOption.attr('selected','selected');
|
||||||
@ -914,7 +911,6 @@
|
|||||||
$('#recurring_due_date').val('');
|
$('#recurring_due_date').val('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
>>>>>>> cf24684adbce402f1c0e266672c4a2a5767dc754
|
|
||||||
|
|
||||||
function applyComboboxListeners() {
|
function applyComboboxListeners() {
|
||||||
var selectorStr = '.invoice-table input, .invoice-table textarea';
|
var selectorStr = '.invoice-table input, .invoice-table textarea';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user