mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01: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->due_date = Utils::fromSqlDate($invoice->due_date);
|
||||
$invoice->is_pro = $account->isPro();
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
$invoice->invoice_fonts = $account->getFontsData();
|
||||
|
||||
>>>>>>> cf24684adbce402f1c0e266672c4a2a5767dc754
|
||||
|
||||
if ($invoice->invoice_design_id == CUSTOM_DESIGN) {
|
||||
$invoice->invoice_design->javascript = $account->custom_design;
|
||||
} else {
|
||||
@ -364,7 +360,7 @@ class InvoiceController extends BaseController
|
||||
$recurringHelp .= $line;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$recurringDueDateHelp = '';
|
||||
foreach (preg_split("/((\r?\n)|(\r\n?))/", trans('texts.recurring_due_date_help')) as $line) {
|
||||
$parts = explode("=>", $line);
|
||||
@ -380,20 +376,20 @@ class InvoiceController extends BaseController
|
||||
$recurringDueDates = array(
|
||||
trans('texts.use_client_terms') => array('value' => '', 'class' => 'monthly weekly'),
|
||||
);
|
||||
|
||||
|
||||
$ends = array('th','st','nd','rd','th','th','th','th','th','th');
|
||||
for($i = 1; $i < 31; $i++){
|
||||
if ($i >= 11 && $i <= 13) $ordinal = $i. 'th';
|
||||
else $ordinal = $i . $ends[$i % 10];
|
||||
|
||||
|
||||
$dayStr = str_pad($i, 2, '0', STR_PAD_LEFT);
|
||||
$str = trans('texts.day_of_month', array('ordinal'=>$ordinal));
|
||||
|
||||
|
||||
$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');
|
||||
|
||||
|
||||
|
||||
|
||||
$daysOfWeek = array(
|
||||
trans('texts.sunday'),
|
||||
trans('texts.monday'),
|
||||
@ -406,13 +402,13 @@ class InvoiceController extends BaseController
|
||||
foreach(array('1st','2nd','3rd','4th') as $i=>$ordinal){
|
||||
foreach($daysOfWeek as $j=>$dayOfWeek){
|
||||
$str = trans('texts.day_of_week_after', array('ordinal' => $ordinal, 'day' => $dayOfWeek));
|
||||
|
||||
|
||||
$day = $i * 7 + $j + 1;
|
||||
$dayStr = str_pad($day, 2, '0', STR_PAD_LEFT);
|
||||
$recurringDueDates[$str] = array('value' => "1998-02-$dayStr", 'data-num' => $day, 'class' => 'weekly');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return [
|
||||
'data' => Input::old('data'),
|
||||
'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_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.',
|
||||
|
||||
|
||||
'token_expired' => 'Validation token was expired. Please try again.',
|
||||
'invoice_link' => 'Invoice Link',
|
||||
'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_purchase_link' => 'Purchase a white label license',
|
||||
<<<<<<< HEAD
|
||||
|
||||
|
||||
// Expense / vendor
|
||||
'expense' => 'Expense',
|
||||
@ -1061,9 +1061,8 @@ return array(
|
||||
'edit_payment_terms' => 'Edit payment term',
|
||||
'edit_payment_term' => 'Edit payment term',
|
||||
'archive_payment_term' => 'Archive payment term',
|
||||
);
|
||||
=======
|
||||
|
||||
|
||||
|
||||
// recurring due dates
|
||||
'recurring_due_dates' => 'Recurring Invoice Due Dates',
|
||||
'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.',
|
||||
|
||||
);
|
||||
>>>>>>> cf24684adbce402f1c0e266672c4a2a5767dc754
|
||||
|
||||
|
@ -175,10 +175,10 @@
|
||||
@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'") !!}
|
||||
@endif
|
||||
|
||||
|
||||
@if ($entityType == ENTITY_INVOICE)
|
||||
<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)
|
||||
{!! trans('texts.created_by_invoice', ['invoice' => link_to('/invoices/'.$invoice->recurring_invoice->public_id, trans('texts.recurring_invoice'))]) !!}
|
||||
@elseif ($invoice->id)
|
||||
@ -628,7 +628,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<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-content">
|
||||
@ -644,7 +644,7 @@
|
||||
<div class="modal-footer" style="margin-top: 0px">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">{{ trans('texts.close') }}</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -673,7 +673,7 @@
|
||||
var $clientSelect = $('select#client');
|
||||
var invoiceDesigns = {!! $invoiceDesigns !!};
|
||||
var invoiceFonts = {!! $invoiceFonts !!};
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// create client dictionary
|
||||
@ -892,20 +892,17 @@
|
||||
@endif
|
||||
|
||||
applyComboboxListeners();
|
||||
<<<<<<< HEAD
|
||||
});
|
||||
=======
|
||||
});
|
||||
|
||||
|
||||
function onFrequencyChange(){
|
||||
var currentName = $('#frequency_id').find('option:selected').text()
|
||||
var currentDueDateNumber = $('#recurring_due_date').find('option:selected').attr('data-num');
|
||||
var optionClass = currentName && currentName.toLowerCase().indexOf('week') > -1 ? 'weekly' : 'monthly';
|
||||
var replacementOption = $('#recurring_due_date option[data-num=' + currentDueDateNumber + '].' + optionClass);
|
||||
|
||||
|
||||
$('#recurring_due_date option').hide();
|
||||
$('#recurring_due_date option.' + optionClass).show();
|
||||
|
||||
|
||||
// Switch to an equivalent option
|
||||
if(replacementOption.length){
|
||||
replacementOption.attr('selected','selected');
|
||||
@ -914,7 +911,6 @@
|
||||
$('#recurring_due_date').val('');
|
||||
}
|
||||
}
|
||||
>>>>>>> cf24684adbce402f1c0e266672c4a2a5767dc754
|
||||
|
||||
function applyComboboxListeners() {
|
||||
var selectorStr = '.invoice-table input, .invoice-table textarea';
|
||||
|
Loading…
Reference in New Issue
Block a user