Skip to content

Commit

Permalink
Get source from the request if the document's item has not item_id
Browse files Browse the repository at this point in the history
  • Loading branch information
burakcakirel committed Sep 11, 2021
1 parent fc38f25 commit 597404a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Jobs/Document/CreateDocumentItemsAndTotals.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,18 @@ protected function createItems(): array
$item['global_discount'] = $this->request['discount'];
}

$item['created_from'] = $this->request['created_from'];
$item['created_by'] = $this->request['created_by'];

if (empty($item['item_id'])) {
$new_item_request = [
'company_id' => $this->request['company_id'],
'name' => $item['name'],
'description' => $item['description'],
'sale_price' => $item['price'],
'purchase_price' => $item['price'],
'created_from' => $item['created_from'],
'created_by' => $item['created_by'],
'enabled' => '1',
];

Expand Down

0 comments on commit 597404a

Please sign in to comment.