Fixed missing tax on create or update document
This commit is contained in:
parent
3a081523e8
commit
ca57ffd8ef
@ -68,6 +68,12 @@ class CreateDocumentItem extends Job implements HasOwner, HasSource, ShouldCreat
|
|||||||
// New variables by tax type & tax sorting
|
// New variables by tax type & tax sorting
|
||||||
foreach ((array) $this->request['tax_ids'] as $tax_id) {
|
foreach ((array) $this->request['tax_ids'] as $tax_id) {
|
||||||
$tax = Tax::find($tax_id);
|
$tax = Tax::find($tax_id);
|
||||||
|
|
||||||
|
// If tax not found, skip
|
||||||
|
if (! $tax) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
${$tax->type . 's'}[] = $tax;
|
${$tax->type . 's'}[] = $tax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user