Build the stuff for incoming invoices.
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
<select name="report" id="report" x-model="data.report" class="border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 rounded-md shadow-sm w-1/4">
|
||||
<option value="invoice">{{ __('excel.Outgoing invoices') }}</option>
|
||||
<option value="payment">{{ __('excel.Incoming payments') }}</option>
|
||||
<option value="incoming">{{ __('excel.Incoming by issue date') }}</option>
|
||||
<option value="outgoing">{{ __('excel.Outgoing by pay date') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</header>
|
||||
@@ -60,7 +62,6 @@
|
||||
let vm = this;
|
||||
axios.post('/excel', this.data, {responseType: "blob"})
|
||||
.then(function(response) {
|
||||
console.log(response);
|
||||
let url = window.URL.createObjectURL(response.data);
|
||||
let a = document.createElement('a');
|
||||
a.href = url;
|
||||
@@ -71,6 +72,12 @@
|
||||
if (vm.data.report === 'payment') {
|
||||
a.download = '{{ __('invoice.Payments') }}' + '.xlsx';
|
||||
}
|
||||
if (vm.data.report === 'incoming') {
|
||||
a.download = '{{ __('incoming.Incoming') }}' + '.xlsx';
|
||||
}
|
||||
if (vm.data.report === 'outgoing') {
|
||||
a.download = '{{ __('incoming.Outgoing') }}' + '.xlsx';
|
||||
}
|
||||
let download = document.querySelector('#download');
|
||||
download.appendChild(a);
|
||||
a.click();
|
||||
|
||||
Reference in New Issue
Block a user