set default store for product, purchase set last store purchased if available or use product default (#672)

This commit is contained in:
kriddles
2020-03-27 13:27:40 -05:00
committed by GitHub
parent d509f9add0
commit 2fee4b45ff
10 changed files with 39 additions and 6 deletions

View File

@@ -179,6 +179,7 @@ class StockController extends BaseController
return $this->renderPage($response, 'productform', [
'locations' => $this->getDatabase()->locations()->orderBy('name'),
'quantityunits' => $this->getDatabase()->quantity_units()->orderBy('name'),
'shoppinglocations' => $this->getDatabase()->shopping_locations()->orderBy('name'),
'productgroups' => $this->getDatabase()->product_groups()->orderBy('name'),
'userfields' => $this->getUserfieldsService()->GetFields('products'),
'products' => $this->getDatabase()->products()->where('parent_product_id IS NULL')->orderBy('name'),
@@ -194,6 +195,7 @@ class StockController extends BaseController
'product' => $product,
'locations' => $this->getDatabase()->locations()->orderBy('name'),
'quantityunits' => $this->getDatabase()->quantity_units()->orderBy('name'),
'shoppinglocations' => $this->getDatabase()->shopping_locations()->orderBy('name'),
'productgroups' => $this->getDatabase()->product_groups()->orderBy('name'),
'userfields' => $this->getUserfieldsService()->GetFields('products'),
'products' => $this->getDatabase()->products()->where('id != :1 AND parent_product_id IS NULL', $product->id)->orderBy('name'),