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) {
|
||||
|
||||
Reference in New Issue
Block a user