Small adjustments to invoices.
This commit is contained in:
@@ -405,17 +405,23 @@
|
||||
tax: tax
|
||||
})
|
||||
.then(function (response) {
|
||||
let error = false;
|
||||
let invoice_id = response.data.id;
|
||||
for (let i = 0; i < self.items.length; i++) {
|
||||
let pos = sort_flipped[i];
|
||||
let item = self.items[pos];
|
||||
axios.post('invoice/' + response.data.id + '/item', item)
|
||||
axios.post('invoice/' + invoice_id + '/item', item)
|
||||
.then(function (response) {
|
||||
console.log(response);
|
||||
})
|
||||
.catch(function (error) {
|
||||
error = true;
|
||||
console.log(error);
|
||||
})
|
||||
}
|
||||
if (!error) {
|
||||
window.location.href = '/invoice/' + invoice_id;
|
||||
}
|
||||
console.log(response);
|
||||
})
|
||||
.catch(function (error) {
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
data: {
|
||||
id: {{ $invoice->id }},
|
||||
To: '{{ $invoice->customer->email }}',
|
||||
Cc: '{{ $invoice->address->email }}',
|
||||
Cc: '{{ ($invoice->address->email === $invoice->customer->email) ? "" : $invoice->address->email }}',
|
||||
Bcc: '',
|
||||
Subject: '{{ __('invoice.Invoice') . ' ' . $invoice->number }}',
|
||||
Body: '{{ __('invoice.Invoice body', ['invoice_number' => $invoice->number]) }}',
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<div style="font-size: 10px;">{{ $options->company_name }}, {{ $options->address }}
|
||||
, {{ $options->zip }} {{ $options->city }}</div>
|
||||
<div style="margin-top: 5mm;">
|
||||
<div>{{ $invoice->customer->name }}</div>
|
||||
@if ( $invoice->customer->name != $invoice->address->name)
|
||||
<div>{{ $invoice->customer->name }}</div>
|
||||
@endif
|
||||
<div>{{ $invoice->address->name }}</div>
|
||||
<div>{{ $invoice->address->address }}</div>
|
||||
<div> </div>
|
||||
|
||||
Reference in New Issue
Block a user