mirror of
https://github.com/grocy/grocy.git
synced 2025-11-02 03:27:48 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41988aa1ee | ||
|
|
18b8712369 | ||
|
|
42a9d5af2b | ||
|
|
c4d377ce4e | ||
|
|
50a782c8c0 | ||
|
|
fa6f09679f | ||
|
|
25c257bb2c | ||
|
|
0496ae9e00 | ||
|
|
45ae386005 | ||
|
|
b6e80580ed | ||
|
|
886e272c03 | ||
|
|
40cc0ff280 | ||
|
|
3a0bb913d5 | ||
|
|
12082b52ab | ||
|
|
2d3df2024a |
17
changelog/46_2.3.0_2019-04-06.md
Normal file
17
changelog/46_2.3.0_2019-04-06.md
Normal file
@@ -0,0 +1,17 @@
|
||||
- Stock improvements
|
||||
- A different location can now also be set during inventory (as for purchases)
|
||||
- A partial minimum stock amount can now be set when "Allow partial units in stock" is enabled (product option)
|
||||
- Recipe improvements
|
||||
- There is now a default per product for "Disable stock fulfillment checking for this ingredient" (ingredient option, default can be defined as a product option)
|
||||
- Some small UI fixes & improvements
|
||||
- THe "Mark as open" button on the stock overview page was disabled when the current stock amount was exactly 1
|
||||
- The number in the "x products expiring within the next 5 days" badge was incorrect for products expiring exactly in 5 days
|
||||
- On the product groups page there is now a new column which displays the product count per group (+ a link to the products page filtered by that product group)
|
||||
- Added a message to clarify that in product dropdowns also something unknown can be entered to start a workflow
|
||||
- Some other small CSS fixes (context menus were not fully displayed when the parent container was to small, improved padding for text inputs)
|
||||
- As always: Updated translations (thanks all the translators)
|
||||
|
||||
### Self promotion
|
||||
[grocy-desktop](https://github.com/grocy/grocy-desktop) is now also available through the Microsoft Store
|
||||
|
||||
<a href="//www.microsoft.com/store/apps/9nwb1trnnksf?cid=storebadge&ocid=badge"><img src="https://assets.windowsphone.com/85864462-9c82-451e-9355-a3d5f874397a/English_get-it-from-MS_InvariantCulture_Default.png" alt="Get it from Microsoft" width="150px" /></a>
|
||||
90
composer.lock
generated
90
composer.lock
generated
@@ -157,16 +157,16 @@
|
||||
},
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
"version": "1.7.1",
|
||||
"version": "1.7.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/erusev/parsedown.git",
|
||||
"reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1"
|
||||
"reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1",
|
||||
"reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1",
|
||||
"url": "https://api.github.com/repos/erusev/parsedown/zipball/6d893938171a817f4e9bc9e86f2da1e370b7bcd7",
|
||||
"reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -199,7 +199,7 @@
|
||||
"markdown",
|
||||
"parser"
|
||||
],
|
||||
"time": "2018-03-08T01:11:30+00:00"
|
||||
"time": "2019-03-17T18:48:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "http-interop/http-factory",
|
||||
@@ -256,7 +256,7 @@
|
||||
},
|
||||
{
|
||||
"name": "illuminate/container",
|
||||
"version": "v5.8.3",
|
||||
"version": "v5.8.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/container.git",
|
||||
@@ -301,16 +301,16 @@
|
||||
},
|
||||
{
|
||||
"name": "illuminate/contracts",
|
||||
"version": "v5.8.3",
|
||||
"version": "v5.8.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/contracts.git",
|
||||
"reference": "3e3a9a654adbf798e05491a5dbf90112df1effde"
|
||||
"reference": "7224ed316427ae5f67c4888679bbf7f6e7773660"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/contracts/zipball/3e3a9a654adbf798e05491a5dbf90112df1effde",
|
||||
"reference": "3e3a9a654adbf798e05491a5dbf90112df1effde",
|
||||
"url": "https://api.github.com/repos/illuminate/contracts/zipball/7224ed316427ae5f67c4888679bbf7f6e7773660",
|
||||
"reference": "7224ed316427ae5f67c4888679bbf7f6e7773660",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -341,11 +341,11 @@
|
||||
],
|
||||
"description": "The Illuminate Contracts package.",
|
||||
"homepage": "https://laravel.com",
|
||||
"time": "2019-02-18T18:37:54+00:00"
|
||||
"time": "2019-03-06T19:39:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/events",
|
||||
"version": "v5.8.3",
|
||||
"version": "v5.8.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/events.git",
|
||||
@@ -390,7 +390,7 @@
|
||||
},
|
||||
{
|
||||
"name": "illuminate/filesystem",
|
||||
"version": "v5.8.3",
|
||||
"version": "v5.8.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/filesystem.git",
|
||||
@@ -442,16 +442,16 @@
|
||||
},
|
||||
{
|
||||
"name": "illuminate/support",
|
||||
"version": "v5.8.3",
|
||||
"version": "v5.8.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/support.git",
|
||||
"reference": "0f0291d1bc2f036af3fceb8e46900b58812533c4"
|
||||
"reference": "e275519c58246cc4011c798f9b0a0f83aae2aab7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/support/zipball/0f0291d1bc2f036af3fceb8e46900b58812533c4",
|
||||
"reference": "0f0291d1bc2f036af3fceb8e46900b58812533c4",
|
||||
"url": "https://api.github.com/repos/illuminate/support/zipball/e275519c58246cc4011c798f9b0a0f83aae2aab7",
|
||||
"reference": "e275519c58246cc4011c798f9b0a0f83aae2aab7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -499,20 +499,20 @@
|
||||
],
|
||||
"description": "The Illuminate Support package.",
|
||||
"homepage": "https://laravel.com",
|
||||
"time": "2019-03-05T13:38:58+00:00"
|
||||
"time": "2019-04-01T19:02:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/view",
|
||||
"version": "v5.8.3",
|
||||
"version": "v5.8.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/view.git",
|
||||
"reference": "33818dc7b783f3afbeea9b0b09455c8cc89aa899"
|
||||
"reference": "942b5a8f59a124513db4a8ec6f6824647d76d745"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/view/zipball/33818dc7b783f3afbeea9b0b09455c8cc89aa899",
|
||||
"reference": "33818dc7b783f3afbeea9b0b09455c8cc89aa899",
|
||||
"url": "https://api.github.com/repos/illuminate/view/zipball/942b5a8f59a124513db4a8ec6f6824647d76d745",
|
||||
"reference": "942b5a8f59a124513db4a8ec6f6824647d76d745",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -548,7 +548,7 @@
|
||||
],
|
||||
"description": "The Illuminate View package.",
|
||||
"homepage": "https://laravel.com",
|
||||
"time": "2019-02-27T12:03:43+00:00"
|
||||
"time": "2019-03-26T01:29:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "morris/lessql",
|
||||
@@ -655,16 +655,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "2.14.2",
|
||||
"version": "2.16.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||
"reference": "a1f4f9abcde8241ce33bf5090896e9c16d0b4232"
|
||||
"reference": "720a9c36927396efeeb48a972e9d129d44b6dc28"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/a1f4f9abcde8241ce33bf5090896e9c16d0b4232",
|
||||
"reference": "a1f4f9abcde8241ce33bf5090896e9c16d0b4232",
|
||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/720a9c36927396efeeb48a972e9d129d44b6dc28",
|
||||
"reference": "720a9c36927396efeeb48a972e9d129d44b6dc28",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -711,7 +711,7 @@
|
||||
"datetime",
|
||||
"time"
|
||||
],
|
||||
"time": "2019-02-28T09:07:12+00:00"
|
||||
"time": "2019-03-29T12:23:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/fast-route",
|
||||
@@ -1341,16 +1341,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
"version": "v4.2.4",
|
||||
"version": "v4.2.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/debug.git",
|
||||
"reference": "de73f48977b8eaf7ce22814d66e43a1662cc864f"
|
||||
"reference": "43ce8ab34c734dcc8a4af576cb86711daab964c5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/de73f48977b8eaf7ce22814d66e43a1662cc864f",
|
||||
"reference": "de73f48977b8eaf7ce22814d66e43a1662cc864f",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/43ce8ab34c734dcc8a4af576cb86711daab964c5",
|
||||
"reference": "43ce8ab34c734dcc8a4af576cb86711daab964c5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1393,11 +1393,11 @@
|
||||
],
|
||||
"description": "Symfony Debug Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-03-03T18:11:24+00:00"
|
||||
"time": "2019-03-10T17:09:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v4.2.4",
|
||||
"version": "v4.2.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
@@ -1446,16 +1446,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.10.0",
|
||||
"version": "v1.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "c79c051f5b3a46be09205c73b80b346e4153e494"
|
||||
"reference": "fe5e94c604826c35a32fa832f35bd036b6799609"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494",
|
||||
"reference": "c79c051f5b3a46be09205c73b80b346e4153e494",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609",
|
||||
"reference": "fe5e94c604826c35a32fa832f35bd036b6799609",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1467,7 +1467,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.9-dev"
|
||||
"dev-master": "1.11-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1501,20 +1501,20 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2018-09-21T13:07:52+00:00"
|
||||
"time": "2019-02-06T07:57:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
"version": "v4.2.4",
|
||||
"version": "v4.2.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation.git",
|
||||
"reference": "748464177a77011f8f4cdd076773862ce4915f8f"
|
||||
"reference": "e46933cc31b68f51f7fc5470fb55550407520f56"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/748464177a77011f8f4cdd076773862ce4915f8f",
|
||||
"reference": "748464177a77011f8f4cdd076773862ce4915f8f",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/e46933cc31b68f51f7fc5470fb55550407520f56",
|
||||
"reference": "e46933cc31b68f51f7fc5470fb55550407520f56",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1574,7 +1574,7 @@
|
||||
],
|
||||
"description": "Symfony Translation Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-02-27T03:31:50+00:00"
|
||||
"time": "2019-04-01T14:13:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tuupola/callable-handler",
|
||||
|
||||
@@ -171,7 +171,13 @@ class StockApiController extends BaseApiController
|
||||
$bestBeforeDate = $requestBody['best_before_date'];
|
||||
}
|
||||
|
||||
$bookingId = $this->StockService->InventoryProduct($args['productId'], $requestBody['new_amount'], $bestBeforeDate);
|
||||
$locationId = null;
|
||||
if (array_key_exists('location_id', $requestBody) && is_numeric($requestBody['location_id']))
|
||||
{
|
||||
$locationId = $requestBody['location_id'];
|
||||
}
|
||||
|
||||
$bookingId = $this->StockService->InventoryProduct($args['productId'], $requestBody['new_amount'], $bestBeforeDate, $locationId);
|
||||
return $this->ApiResponse($this->Database->stock_log($bookingId));
|
||||
}
|
||||
catch (\Exception $ex)
|
||||
|
||||
@@ -48,7 +48,8 @@ class StockController extends BaseController
|
||||
public function Inventory(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||
{
|
||||
return $this->AppContainer->view->render($response, 'inventory', [
|
||||
'products' => $this->Database->products()->orderBy('name')
|
||||
'products' => $this->Database->products()->orderBy('name'),
|
||||
'locations' => $this->Database->locations()->orderBy('name')
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -92,7 +93,8 @@ class StockController extends BaseController
|
||||
public function ProductGroupsList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||
{
|
||||
return $this->AppContainer->view->render($response, 'productgroups', [
|
||||
'productGroups' => $this->Database->product_groups()->orderBy('name')
|
||||
'productGroups' => $this->Database->product_groups()->orderBy('name'),
|
||||
'products' => $this->Database->products()->orderBy('name')
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -1229,6 +1229,11 @@
|
||||
"type": "string",
|
||||
"format": "date",
|
||||
"description": "The best before date which applies to added products"
|
||||
},
|
||||
"location_id": {
|
||||
"type": "number",
|
||||
"format": "integer",
|
||||
"description": "If omitted, the default location of the product is used (only applies to added products)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ return array(
|
||||
'Inventory' => 'Inventur',
|
||||
'Shopping list' => 'Einkaufszettel',
|
||||
'Chore tracking' => 'Hausarbeiten-Ausführung',
|
||||
'Battery tracking' => 'Batterie-Ladzyklus',
|
||||
'Battery tracking' => 'Batterie-Ladezyklus',
|
||||
'Products' => 'Produkte',
|
||||
'Locations' => 'Standorte',
|
||||
'Quantity units' => 'Mengeneinheiten',
|
||||
@@ -355,5 +355,8 @@ return array(
|
||||
'System info' => 'Systeminformationen',
|
||||
'Changelog' => 'Änderungsprotokoll',
|
||||
'will be multiplied a factor of #1 to get #2' => 'wird mit dem Faktor #1 multipliziert um #2 zu erhalten',
|
||||
'The given date is earlier than today, are you sure?' => 'Das angegebene Datum ist früher als heute, bist du sicher?'
|
||||
'The given date is earlier than today, are you sure?' => 'Das angegebene Datum ist früher als heute, bist du sicher?',
|
||||
'Product count' => 'Produktanzahl',
|
||||
'Type a new product name or barcode and hit TAB to start a workflow' => 'Gib einen neuen Produktnamen oder Barcode ein und drücke TAB um einen Workflow zu starten',
|
||||
'This will be used as the default setting when adding this product as a recipe ingredient' => 'Dies wird als Standardeinstellung verwendet wenn dieses Produkt als Rezeptzutat hinzugefügt wird'
|
||||
);
|
||||
|
||||
@@ -355,5 +355,8 @@ return array(
|
||||
'System info' => 'System info',
|
||||
'Changelog' => 'Changelog',
|
||||
'will be multiplied a factor of #1 to get #2' => 'will be multiplied a factor of #1 to get #2',
|
||||
'The given date is earlier than today, are you sure?' => 'The given date is earlier than today, are you sure?'
|
||||
'The given date is earlier than today, are you sure?' => 'The given date is earlier than today, are you sure?',
|
||||
'Product count' => 'Product count',
|
||||
'Type a new product name or barcode and hit TAB to start a workflow' => 'Type a new product name or barcode and hit TAB to start a workflow',
|
||||
'This will be used as the default setting when adding this product as a recipe ingredient' => 'This will be used as the default setting when adding this product as a recipe ingredient'
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@ return array(
|
||||
'timeago_locale' => 'no',
|
||||
'timeago_nan' => 'for NaN År',
|
||||
'moment_locale' => 'nb',
|
||||
'datatables_localization' => '{"sEmptyTable":"Det finnes ingen data i tabellen","sInfo":"_START_ fra _END_ til _TOTAL_ skriv","sInfoEmpty":"Ingen data tilgjengelign","sInfoFiltered":"(filtrert fra _MAX_ skriv)","sInfoPostFix":"","sInfoThousands":".","sLengthMenu":"_MENU_ registrer deg","sLoadingRecords":"Laster ..","sProcessing":"Vennligst vent ..","sSearch":"Søk","sZeroRecords":"Ingen oppføringer tilgjengelig","oPaginate":{"sFirst":"Første","sPrevious":"Bakover","sNext":"Neste","sLast":"Siste"},"oAria":{"sSortAscending":": Sortér stigende","sSortDescending":": Sortér synkende"},"select":{"rows":{"0":"klikk på en linje for å velge","1":"1 linje valgt","_":"%d linger valgt"}},"buttons":{"print":"Print","colvis":"Søyle","copy":"Kopi","copyTitle":"Kopier til utklippstavlen","copyKeys":"Trykk <i>ctrl</i> eller <i>⌘</i> + <i>C</i> for å kopiere tabell<br> til utklipptavlen.<br><br>For å avbryte, klikke på meldingen eller trykk på ESC.","copySuccess":{"1":"1 Kolonne kopiert","_":"%d kolonne kopiert"}}}',
|
||||
'datatables_localization' => '{"sEmptyTable":"Det finnes ingen data i tabellen","sInfo":"_START_ fra _END_ til _TOTAL_ skriv","sInfoEmpty":"Ingen data tilgjengelign","sInfoFiltered":"(filtrert fra _MAX_ skriv)","sInfoPostFix":"","sInfoThousands":".","sLengthMenu":"_MENU_ per side","sLoadingRecords":"Laster ..","sProcessing":"Vennligst vent ..","sSearch":"Søk","sZeroRecords":"Ingen oppføringer tilgjengelig","oPaginate":{"sFirst":"Første","sPrevious":"Bakover","sNext":"Neste","sLast":"Siste"},"oAria":{"sSortAscending":": Sortér stigende","sSortDescending":": Sortér synkende"},"select":{"rows":{"0":"klikk på en linje for å velge","1":"1 linje valgt","_":" linger valgt"}},"buttons":{"print":"Print","colvis":"Søyle","copy":"Kopi","copyTitle":"Kopier til utklippstavlen","copyKeys":"Trykk <i>ctrl</i> eller <i>⌘</i> + <i>C</i> for å kopiere tabell<br> til utklipptavlen.<br><br>For å avbryte, klikke på meldingen eller trykk på ESC.","copySuccess":{"1":"1 Kolonne kopiert","_":" kolonne kopiert"}}}',
|
||||
'summernote_locale' => 'nb-NO',
|
||||
'fullcalendar_locale' => 'nb'
|
||||
);
|
||||
|
||||
@@ -84,7 +84,7 @@ return array(
|
||||
'Bottom' => 'Bunn',
|
||||
'Topping' => 'Topping',
|
||||
'French' => 'Fransk',
|
||||
'Turkish' => 'Turkish',
|
||||
'Spanish' => 'Spanish',
|
||||
'Russian' => 'Russian'
|
||||
'Turkish' => 'Tyrkisk',
|
||||
'Spanish' => 'Spansk',
|
||||
'Russian' => 'Russisk'
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
return array(
|
||||
'purchase' => 'Innkjøp',
|
||||
'consume' => 'Forbruke produkt',
|
||||
'consume' => 'Forbruk produkt',
|
||||
'inventory-correction' => 'Korreksjon av husholdningsantall ',
|
||||
'product-opened' => 'Produkt åpnet'
|
||||
);
|
||||
|
||||
@@ -131,7 +131,7 @@ return array(
|
||||
'Search' => 'Søk',
|
||||
'Not logged in' => 'Ikke logget inn',
|
||||
'You have to select a product' => 'Du må velge et produkt',
|
||||
'You have to select a chore' => 'Du må velge en husarbeids oppgave',
|
||||
'You have to select a chore' => 'Du må velge en husarbeidsoppgave',
|
||||
'You have to select a battery' => 'Du må velge et batteri',
|
||||
'A name is required' => 'Vennligst fyll inn et navn',
|
||||
'A location is required' => 'En lokasjon kreves',
|
||||
@@ -139,7 +139,7 @@ return array(
|
||||
'This cannot be negative' => 'Dette kan ikke være negativt',
|
||||
'A quantity unit is required' => 'Forpakning antall/størrelse kreves',
|
||||
'A period type is required' => 'En periodetype kreves',
|
||||
'A best before date is required' => 'A best before date is required',
|
||||
'A best before date is required' => 'En best før dato kreves',
|
||||
'Settings' => 'Innstillinger',
|
||||
'This can only be before now' => 'Dette kan kun være før nå',
|
||||
'Calendar' => 'Kalender',
|
||||
@@ -240,8 +240,8 @@ return array(
|
||||
'Edit product group' => 'Endre produkt gruppe',
|
||||
'Product group' => 'Produktgruppe',
|
||||
'Are you sure to delete product group "#1"?' => 'Er du sikker du ønsker å slette produktgruppe "#1"?',
|
||||
'Stay logged in permanently' => 'Alltid være innlogget',
|
||||
'When not set, you will get logged out at latest after 30 days' => 'Når den ikke er satt vil du bli logget ut etter 30 dager',
|
||||
'Stay logged in permanently' => 'Husk meg',
|
||||
'When not set, you will get logged out at latest after 30 days' => 'Hvis "Husk meg" ikke er huket av vil du automatisk bli logget av om 30 dager',
|
||||
'Filter by status' => 'Filtrér etter status',
|
||||
'Below min. stock amount' => 'Under under minimum husholdningsnivå',
|
||||
'Expiring soon' => 'Går snart ut på dato',
|
||||
@@ -324,36 +324,39 @@ return array(
|
||||
'Shopping list to stock workflow' => 'Arbeidsflyt fra handleliste til husholding',
|
||||
'Automatically do the booking using the last price and the amount of the shopping list item, if the product has "Default best before days" set' => 'Legg produkter automatisk til fra handlelisten. Dette vil bruke sist innkjøpspris og forutsetter at "Standard for antall dager best før" er satt',
|
||||
'Skip' => 'Hopp over',
|
||||
'Servings' => 'Servings',
|
||||
'Costs' => 'Costs',
|
||||
'Based on the prices of the last purchase per product' => 'Based on the prices of the last purchase per product',
|
||||
'The ingredients listed here result in this amount of servings' => 'The ingredients listed here result in this amount of servings',
|
||||
'Do not check against the shopping list when adding missing items to it' => 'Do not check against the shopping list when adding missing items to it',
|
||||
'By default the amount to be added to the shopping list is "needed amount - stock amount - shopping list amount" - when this is enabled, it is only checked against the stock amount, not against what is already on the shopping list' => 'By default the amount to be added to the shopping list is "needed amount - stock amount - shopping list amount" - when this is enabled, it is only checked against the stock amount, not against what is already on the shopping list',
|
||||
'Picture' => 'Picture',
|
||||
'Uncheck ingredients to not put them on the shopping list' => 'Uncheck ingredients to not put them on the shopping list',
|
||||
'This is for statistical purposes only' => 'This is for statistical purposes only',
|
||||
'You have to select a recipe' => 'You have to select a recipe',
|
||||
'Servings' => 'Prosjoner',
|
||||
'Costs' => 'Kostnad',
|
||||
'Based on the prices of the last purchase per product' => 'Basert på prisen av siste kjøpte produkt',
|
||||
'The ingredients listed here result in this amount of servings' => 'Ingrediensene som er lagt til er beregnet for antall porsjoner du oppgir her',
|
||||
'Do not check against the shopping list when adding missing items to it' => 'Ikke sjekk handleliste når du legger til manglende produkt',
|
||||
'By default the amount to be added to the shopping list is "needed amount - stock amount - shopping list amount" - when this is enabled, it is only checked against the stock amount, not against what is already on the shopping list' => 'Som standard vil antallet som skal legges til handlelisten være slik "nødvendig antall - husholdningsantall - handleliste antall". Men når denne funksjonen er aktivert vil det være slik "nødvendig antall - husholdningsantall"',
|
||||
'Picture' => 'Bilde',
|
||||
'Uncheck ingredients to not put them on the shopping list' => 'Fjern huk for å ikke legge produktet i handlelisten',
|
||||
'This is for statistical purposes only' => 'Dette er kun for statistikk',
|
||||
'You have to select a recipe' => 'Du må velge en oppskrift',
|
||||
'Key type' => 'Key type',
|
||||
'Share/Integrate calendar (iCal)' => 'Share/Integrate calendar (iCal)',
|
||||
'Use the following (public) URL to share or integrate the calendar in iCal format' => 'Use the following (public) URL to share or integrate the calendar in iCal format',
|
||||
'Allow partial units in stock' => 'Allow partial units in stock',
|
||||
'Enable tare weight handling' => 'Enable tare weight handling',
|
||||
'This is useful e.g. for flour in jars - on purchase/consume/inventory you always weigh the whole jar, the amount to be posted is then automatically calculated based on what is in stock and the tare weight defined below' => 'This is useful e.g. for flour in jars - on purchase/consume/inventory you always weigh the whole jar, the amount to be posted is then automatically calculated based on what is in stock and the tare weight defined below',
|
||||
'Tare weight' => 'Tare weight',
|
||||
'Tare weight handling enabled - please weigh the whole container, the amount to be posted will be automatically calculcated' => 'Tare weight handling enabled - please weigh the whole container, the amount to be posted will be automatically calculcated',
|
||||
'You have to select a location' => 'You have to select a location',
|
||||
'List' => 'List',
|
||||
'Gallery' => 'Gallery',
|
||||
'The current picture will be deleted when you save the recipe' => 'The current picture will be deleted when you save the recipe',
|
||||
'Show product details' => 'Show product details',
|
||||
'Stock journal for this product' => 'Stock journal for this product',
|
||||
'Show chore details' => 'Show chore details',
|
||||
'Journal for this chore' => 'Journal for this chore',
|
||||
'Show battery details' => 'Show battery details',
|
||||
'Journal for this battery' => 'Journal for this battery',
|
||||
'Share/Integrate calendar (iCal)' => 'Del/ Integrer kalender (iCal)',
|
||||
'Use the following (public) URL to share or integrate the calendar in iCal format' => 'Bruk følgene (offentlig) URL til å dele eller integrere kalenderen i iCal format',
|
||||
'Allow partial units in stock' => 'Tillat oppdelte enheter i husholdningen',
|
||||
'Enable tare weight handling' => 'Aktiver tara vekt funksjon',
|
||||
'This is useful e.g. for flour in jars - on purchase/consume/inventory you always weigh the whole jar, the amount to be posted is then automatically calculated based on what is in stock and the tare weight defined below' => 'Dette er nyttig f.eks med mel i en beholder. Ved innkjøp/ forbruk/ endring av husholdning veier du alltid hele beholderen. Gjenværende mengde vil så bli kalkulert i forhold til hva som er i husholdningen og tara vekten definert under',
|
||||
'Tare weight' => 'Tara vekt',
|
||||
'Tare weight handling enabled - please weigh the whole container, the amount to be posted will be automatically calculcated' => 'Tara vekt funksjon på - vennligst vei hele beholderen. Mengden vil automatisk bli kalkulert',
|
||||
'You have to select a location' => 'Du må velge en lokasjon',
|
||||
'List' => 'Liste',
|
||||
'Gallery' => 'Bildegalleri',
|
||||
'The current picture will be deleted when you save the recipe' => 'Nåværende bilde vil bli slettet når du larer oppskriften',
|
||||
'Show product details' => 'Vis produkt detaljer',
|
||||
'Stock journal for this product' => 'Husholdningslogg for dette produktet',
|
||||
'Show chore details' => 'Vis husarbeidarbeid detaljer',
|
||||
'Journal for this chore' => 'Logg for husarbeidsoppgave',
|
||||
'Show battery details' => 'Hvis batteridetaljer',
|
||||
'Journal for this battery' => 'Logg for dette batteriet',
|
||||
'System info' => 'System info',
|
||||
'Changelog' => 'Changelog',
|
||||
'will be multiplied a factor of #1 to get #2' => 'will be multiplied a factor of #1 to get #2',
|
||||
'The given date is earlier than today, are you sure?' => 'The given date is earlier than today, are you sure?'
|
||||
'Changelog' => 'Change Log',
|
||||
'will be multiplied a factor of #1 to get #2' => 'Vil bli ganget med #1 for å få #2',
|
||||
'The given date is earlier than today, are you sure?' => 'Den oppgitte datoen er tidligere enn i dag, er du sikker du ønsker å bruke denne?',
|
||||
'Product count' => 'Product count',
|
||||
'Type a new product name or barcode and hit TAB to start a workflow' => 'Type a new product name or barcode and hit TAB to start a workflow',
|
||||
'This will be used as the default setting when adding this product as a recipe ingredient' => 'This will be used as the default setting when adding this product as a recipe ingredient'
|
||||
);
|
||||
|
||||
@@ -86,5 +86,5 @@ return array(
|
||||
'French' => 'Fransızca',
|
||||
'Turkish' => 'Türkçe',
|
||||
'Spanish' => 'İspanyolca',
|
||||
'Russian' => 'Russian'
|
||||
'Russian' => 'Rusça'
|
||||
);
|
||||
|
||||
@@ -139,7 +139,7 @@ return array(
|
||||
'This cannot be negative' => 'Bu negatif olamaz',
|
||||
'A quantity unit is required' => 'Miktar birim zorunlu',
|
||||
'A period type is required' => 'Dönem tipi zorunlu',
|
||||
'A best before date is required' => 'A best before date is required',
|
||||
'A best before date is required' => 'Son kullanma tarihi gerekiyor',
|
||||
'Settings' => 'Ayarlar',
|
||||
'This can only be before now' => 'Bu sadece şu andan önce olabilir',
|
||||
'Calendar' => 'Takvim',
|
||||
@@ -334,26 +334,29 @@ return array(
|
||||
'Uncheck ingredients to not put them on the shopping list' => 'Alışveriş listesine malzemeleri eklememek için işareti kaldırın',
|
||||
'This is for statistical purposes only' => 'Bu sadece istatistiki amaçlar için',
|
||||
'You have to select a recipe' => 'Bir tarif seçmelisiniz',
|
||||
'Key type' => 'Key type',
|
||||
'Share/Integrate calendar (iCal)' => 'Share/Integrate calendar (iCal)',
|
||||
'Use the following (public) URL to share or integrate the calendar in iCal format' => 'Use the following (public) URL to share or integrate the calendar in iCal format',
|
||||
'Allow partial units in stock' => 'Allow partial units in stock',
|
||||
'Enable tare weight handling' => 'Enable tare weight handling',
|
||||
'This is useful e.g. for flour in jars - on purchase/consume/inventory you always weigh the whole jar, the amount to be posted is then automatically calculated based on what is in stock and the tare weight defined below' => 'This is useful e.g. for flour in jars - on purchase/consume/inventory you always weigh the whole jar, the amount to be posted is then automatically calculated based on what is in stock and the tare weight defined below',
|
||||
'Tare weight' => 'Tare weight',
|
||||
'Tare weight handling enabled - please weigh the whole container, the amount to be posted will be automatically calculcated' => 'Tare weight handling enabled - please weigh the whole container, the amount to be posted will be automatically calculcated',
|
||||
'You have to select a location' => 'You have to select a location',
|
||||
'List' => 'List',
|
||||
'Gallery' => 'Gallery',
|
||||
'The current picture will be deleted when you save the recipe' => 'The current picture will be deleted when you save the recipe',
|
||||
'Show product details' => 'Show product details',
|
||||
'Stock journal for this product' => 'Stock journal for this product',
|
||||
'Show chore details' => 'Show chore details',
|
||||
'Journal for this chore' => 'Journal for this chore',
|
||||
'Show battery details' => 'Show battery details',
|
||||
'Journal for this battery' => 'Journal for this battery',
|
||||
'System info' => 'System info',
|
||||
'Changelog' => 'Changelog',
|
||||
'will be multiplied a factor of #1 to get #2' => 'will be multiplied a factor of #1 to get #2',
|
||||
'The given date is earlier than today, are you sure?' => 'The given date is earlier than today, are you sure?'
|
||||
'Key type' => 'Anahtar türü',
|
||||
'Share/Integrate calendar (iCal)' => 'Takvime ekle/paylaş (iCal)',
|
||||
'Use the following (public) URL to share or integrate the calendar in iCal format' => 'Takvimle iCal formatında paylaşmak veya takvime entegre etmek için aşağıdaki (herkese açık) URL\'yi kullanın',
|
||||
'Allow partial units in stock' => 'Stoklarda kısmi birimlere izin ver',
|
||||
'Enable tare weight handling' => 'Dara ağırlığı yönetimini aktif et',
|
||||
'This is useful e.g. for flour in jars - on purchase/consume/inventory you always weigh the whole jar, the amount to be posted is then automatically calculated based on what is in stock and the tare weight defined below' => 'Örnek: Kavanozlardaki unu satın alım/harcama/envanter işlemlerinde kavanozun tamamını tartıyorsunuz, sonrasında kaydedilecek olan miktar otomatik olarak stoklarda olanlar ve aşağıda tanımlanmış olan dara ağırlığı üzerinden hesaplanıyor',
|
||||
'Tare weight' => 'Dara ağırlığı',
|
||||
'Tare weight handling enabled - please weigh the whole container, the amount to be posted will be automatically calculcated' => 'Dara ağırlığı kontrolü aktif edildi - lütfen tüm konteyneri tartın, gönderilecek olan veri otomatik olarak hesaplanacaktır',
|
||||
'You have to select a location' => 'Bir lokasyon seçmeniz gerekiyor',
|
||||
'List' => 'Liste',
|
||||
'Gallery' => 'Galeri',
|
||||
'The current picture will be deleted when you save the recipe' => 'Tarifi kaydettiğiniz zaman şimdiki fotoğraf silinecek',
|
||||
'Show product details' => 'Ürün detaylarını göster',
|
||||
'Stock journal for this product' => 'Bu ürün için stok günlüğü',
|
||||
'Show chore details' => 'Düzenli iş detaylarını göster',
|
||||
'Journal for this chore' => 'Bu düzenli iş için günlük',
|
||||
'Show battery details' => 'Pil detaylarını göster',
|
||||
'Journal for this battery' => 'Bu pil için günlük',
|
||||
'System info' => 'Sistem bilgisi',
|
||||
'Changelog' => 'Değişiklikler',
|
||||
'will be multiplied a factor of #1 to get #2' => '#2\'yi bulmak için #1\'in faktörüyle çarpılacak',
|
||||
'The given date is earlier than today, are you sure?' => 'Yazılan tarih bugünden daha önce, emin misiniz?',
|
||||
'Product count' => 'Product count',
|
||||
'Type a new product name or barcode and hit TAB to start a workflow' => 'Type a new product name or barcode and hit TAB to start a workflow',
|
||||
'This will be used as the default setting when adding this product as a recipe ingredient' => 'This will be used as the default setting when adding this product as a recipe ingredient'
|
||||
);
|
||||
|
||||
2
migrations/0061.sql
Normal file
2
migrations/0061.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE products
|
||||
ADD not_check_stock_fulfillment_for_recipes TINYINT DEFAULT 0;
|
||||
@@ -178,6 +178,11 @@ input::-webkit-inner-spin-button {
|
||||
background-size: 0 0;
|
||||
}
|
||||
|
||||
/* There is a little too much padding on form inputs */
|
||||
.form-control {
|
||||
padding-right: 0.75rem !important;
|
||||
}
|
||||
|
||||
/* Third party component customizations - DataTables */
|
||||
td {
|
||||
vertical-align: middle !important;
|
||||
@@ -194,6 +199,10 @@ td {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody {
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
/* Third party component customizations - toastr */
|
||||
#toast-container > div {
|
||||
opacity: 1;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
var jsonData = { };
|
||||
jsonData.new_amount = jsonForm.new_amount;
|
||||
jsonData.best_before_date = Grocy.Components.DateTimePicker.GetValue();
|
||||
jsonData.location_id = Grocy.Components.LocationPicker.GetValue();
|
||||
|
||||
Grocy.Api.Post('stock/products/' + jsonForm.product_id + '/inventory', jsonData,
|
||||
function(result)
|
||||
@@ -112,6 +113,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
$("#tare-weight-handling-info").addClass("d-none");
|
||||
}
|
||||
|
||||
Grocy.Components.LocationPicker.SetId(productDetails.location.id);
|
||||
$('#new_amount').focus();
|
||||
},
|
||||
function(xhr)
|
||||
@@ -212,11 +214,13 @@ $('#new_amount').on('keyup', function(e)
|
||||
{
|
||||
$('#inventory-change-info').text(L('This means #1 will be added to stock', estimatedBookingAmount.toLocaleString() + ' ' + Pluralize(estimatedBookingAmount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural)));
|
||||
Grocy.Components.DateTimePicker.GetInputElement().attr('required', '');
|
||||
Grocy.Components.LocationPicker.GetInputElement().attr('required', '');
|
||||
}
|
||||
else if (newAmount < productStockAmount + containerWeight)
|
||||
{
|
||||
$('#inventory-change-info').text(L('This means #1 will be removed from stock', estimatedBookingAmount.toLocaleString() + ' ' + Pluralize(estimatedBookingAmount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural)));
|
||||
Grocy.Components.DateTimePicker.GetInputElement().removeAttr('required');
|
||||
Grocy.Components.LocationPicker.GetInputElement().removeAttr('required');
|
||||
}
|
||||
|
||||
Grocy.FrontendHelpers.ValidateForm('inventory-form');
|
||||
|
||||
@@ -215,6 +215,22 @@ $("#enable_tare_weight_handling").on("click", function()
|
||||
Grocy.FrontendHelpers.ValidateForm("product-form");
|
||||
});
|
||||
|
||||
$("#allow_partial_units_in_stock").on("click", function()
|
||||
{
|
||||
if (this.checked)
|
||||
{
|
||||
$("#min_stock_amount").attr("min", "0.00");
|
||||
$("#min_stock_amount").attr("step", "0.01");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#min_stock_amount").attr("min", "0");
|
||||
$("#min_stock_amount").attr("step", "1");
|
||||
}
|
||||
|
||||
Grocy.FrontendHelpers.ValidateForm("product-form");
|
||||
});
|
||||
|
||||
Grocy.DeleteProductPictureOnSave = false;
|
||||
$('#delete-current-product-picture-button').on('click', function (e)
|
||||
{
|
||||
@@ -245,3 +261,7 @@ if (Grocy.EditMode === 'create')
|
||||
$('#name').focus();
|
||||
$('.input-group-qu').trigger('change');
|
||||
Grocy.FrontendHelpers.ValidateForm('product-form');
|
||||
|
||||
// Click twice to trigger on-click but not change the actual checked state
|
||||
$("#allow_partial_units_in_stock").click();
|
||||
$("#allow_partial_units_in_stock").click();
|
||||
|
||||
@@ -32,6 +32,23 @@ $("#search").on("keyup", function()
|
||||
productsTable.search(value).draw();
|
||||
});
|
||||
|
||||
$("#product-group-filter").on("change", function()
|
||||
{
|
||||
var value = $("#product-group-filter option:selected").text();
|
||||
if (value === L("All"))
|
||||
{
|
||||
value = "";
|
||||
}
|
||||
|
||||
productsTable.column(7).search(value).draw();
|
||||
});
|
||||
|
||||
if (typeof GetUriParam("product-group") !== "undefined")
|
||||
{
|
||||
$("#product-group-filter").val(GetUriParam("product-group"));
|
||||
$("#product-group-filter").trigger("change");
|
||||
}
|
||||
|
||||
$(document).on('click', '.product-delete-button', function (e)
|
||||
{
|
||||
var objectName = $(e.currentTarget).attr('data-product-name');
|
||||
|
||||
@@ -46,7 +46,7 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
Grocy.Components.ProductCard.Refresh(productId);
|
||||
|
||||
Grocy.Api.Get('stock/products/' + productId,
|
||||
function (productDetails)
|
||||
function(productDetails)
|
||||
{
|
||||
if (!$("#only_check_single_unit_in_stock").is(":checked"))
|
||||
{
|
||||
@@ -66,6 +66,8 @@ Grocy.Components.ProductPicker.GetPicker().on('change', function(e)
|
||||
$("#amount").parent().find(".invalid-feedback").text(L('The amount cannot be lower than #1', '1'));
|
||||
}
|
||||
|
||||
$("#not_check_stock_fulfillment").prop("checked", productDetails.product.not_check_stock_fulfillment_for_recipes == 1);
|
||||
|
||||
$('#amount').focus();
|
||||
Grocy.FrontendHelpers.ValidateForm('recipe-pos-form');
|
||||
},
|
||||
|
||||
@@ -53,11 +53,11 @@ class StockService extends BaseService
|
||||
public function GetExpiringProducts(int $days = 5, bool $excludeExpired = false)
|
||||
{
|
||||
$currentStock = $this->GetCurrentStock(true);
|
||||
$currentStock = FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime("+$days days")), '<');
|
||||
$currentStock = FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d 23:59:59', strtotime("+$days days")), '<');
|
||||
|
||||
if ($excludeExpired)
|
||||
{
|
||||
$currentStock = FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime('now')), '>');
|
||||
$currentStock = FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d 23:59:59', strtotime('now')), '>');
|
||||
}
|
||||
|
||||
return $currentStock;
|
||||
@@ -292,7 +292,7 @@ class StockService extends BaseService
|
||||
}
|
||||
}
|
||||
|
||||
public function InventoryProduct(int $productId, int $newAmount, string $bestBeforeDate)
|
||||
public function InventoryProduct(int $productId, int $newAmount, string $bestBeforeDate, $locationId = null)
|
||||
{
|
||||
if (!$this->ProductExists($productId))
|
||||
{
|
||||
@@ -318,7 +318,7 @@ class StockService extends BaseService
|
||||
$bookingAmount = $newAmount;
|
||||
}
|
||||
|
||||
$this->AddProduct($productId, $bookingAmount, $bestBeforeDate, self::TRANSACTION_TYPE_INVENTORY_CORRECTION, date('Y-m-d'), $productDetails->last_price);
|
||||
$this->AddProduct($productId, $bookingAmount, $bestBeforeDate, self::TRANSACTION_TYPE_INVENTORY_CORRECTION, date('Y-m-d'), $productDetails->last_price, $locationId);
|
||||
}
|
||||
else if ($newAmount < $productDetails->stock_amount + $containerWeight)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"Version": "2.2.0",
|
||||
"ReleaseDate": "2019-03-10"
|
||||
"Version": "2.3.0",
|
||||
"ReleaseDate": "2019-04-06"
|
||||
}
|
||||
|
||||
@@ -17,5 +17,6 @@
|
||||
</select>
|
||||
<div class="invalid-feedback">{{ $L('You have to select a product') }}</div>
|
||||
<div id="custom-productpicker-error" class="form-text text-danger d-none"></div>
|
||||
<div class="form-text text-info small">{{ $L('Type a new product name or barcode and hit TAB to start a workflow') }}</div>
|
||||
<div id="flow-info-addbarcodetoselection" class="form-text text-muted small d-none"><strong><span id="addbarcodetoselection"></span></strong> {{ $L('will be added to the list of barcodes for the selected product on submit') }}</div>
|
||||
</div>
|
||||
|
||||
@@ -45,6 +45,11 @@
|
||||
'earlierThanInfoText' => $L('The given date is earlier than today, are you sure?')
|
||||
))
|
||||
|
||||
@include('components.locationpicker', array(
|
||||
'locations' => $locations,
|
||||
'hint' => 'This will apply to added products'
|
||||
))
|
||||
|
||||
<button id="save-inventory-button" class="btn btn-success">{{ $L('OK') }}</button>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -165,6 +165,18 @@
|
||||
'hintId' => 'tare_weight_qu_info'
|
||||
))
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_RECIPES)
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input type="hidden" name="not_check_stock_fulfillment_for_recipes" value="0">
|
||||
<input @if($mode == 'edit' && $product->not_check_stock_fulfillment_for_recipes == 1) checked @endif class="form-check-input" type="checkbox" id="not_check_stock_fulfillment_for_recipes" name="not_check_stock_fulfillment_for_recipes" value="1">
|
||||
<label class="form-check-label" for="not_check_stock_fulfillment_for_recipes">{{ $L('Disable stock fulfillment checking for this ingredient') }}
|
||||
<span class="text-muted small">{{ $L('This will be used as the default setting when adding this product as a recipe ingredient') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="form-group">
|
||||
<label for="product-picture">{{ $L('Product picture') }}
|
||||
<span class="text-muted small">{{ $L('If you don\'t select a file, the current picture will not be altered') }}</span>
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<th class="border-right"></th>
|
||||
<th>{{ $L('Name') }}</th>
|
||||
<th>{{ $L('Description') }}</th>
|
||||
<th>{{ $L('Product count') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="d-none">
|
||||
@@ -50,6 +51,12 @@
|
||||
<td>
|
||||
{{ $productGroup->description }}
|
||||
</td>
|
||||
<td>
|
||||
{{ count(FindAllObjectsInArrayByPropertyValue($products, 'product_group_id', $productGroup->id)) }}
|
||||
<a class="btn btn-link btn-sm text-body" href="{{ $U('/products?product-group=') . $productGroup->id }}">
|
||||
<i class="fas fa-external-link-alt"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
@@ -24,6 +24,15 @@
|
||||
<label for="search">{{ $L('Search') }}</label> <i class="fas fa-search"></i>
|
||||
<input type="text" class="form-control" id="search">
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 col-xl-3">
|
||||
<label for="location-filter">{{ $L('Filter by product group') }}</label> <i class="fas fa-filter"></i>
|
||||
<select class="form-control" id="product-group-filter">
|
||||
<option value="all">{{ $L('All') }}</option>
|
||||
@foreach($productGroups as $productGroup)
|
||||
<option value="{{ $productGroup->id }}">{{ $productGroup->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
<div class="form-check mb-3">
|
||||
<input type="hidden" name="not_check_stock_fulfillment" value="0">
|
||||
<input @if($mode == 'edit' && $recipePos->not_check_stock_fulfillment == 1) checked @endif class="form-check-input" type="checkbox" id="not_check_stock_fulfillment" name="not_check_stock_fulfillment" value="1">
|
||||
<input @if($mode == 'edit' && ($recipePos->not_check_stock_fulfillment == 1 || FindObjectInArrayByPropertyValue($products, 'id', $recipePos->product_id)->not_check_stock_fulfillment_for_recipes == 1)) checked @endif class="form-check-input" type="checkbox" id="not_check_stock_fulfillment" name="not_check_stock_fulfillment" value="1">
|
||||
<label class="form-check-label" for="not_check_stock_fulfillment">{{ $L('Disable stock fulfillment checking for this ingredient') }}</label>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
@foreach($currentStock as $currentStockEntry)
|
||||
<tr id="product-{{ $currentStockEntry->product_id }}-row" class="@if($currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime('-1 days')) && $currentStockEntry->amount > 0) table-danger @elseif($currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime("+$nextXDays days")) && $currentStockEntry->amount > 0) table-warning @elseif (FindObjectInArrayByPropertyValue($missingProducts, 'id', $currentStockEntry->product_id) !== null) table-info @endif">
|
||||
<td class="fit-content border-right">
|
||||
<a class="btn btn-success btn-sm product-consume-button @if($currentStockEntry->amount <= 1) disabled @endif" href="#" data-toggle="tooltip" data-placement="left" title="{{ $L('Consume #3 #1 of #2', FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name, 1) }}"
|
||||
<a class="btn btn-success btn-sm product-consume-button @if($currentStockEntry->amount < 1) disabled @endif" href="#" data-toggle="tooltip" data-placement="left" title="{{ $L('Consume #3 #1 of #2', FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name, 1) }}"
|
||||
data-product-id="{{ $currentStockEntry->product_id }}"
|
||||
data-product-name="{{ FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name }}"
|
||||
data-product-qu-name="{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name }}"
|
||||
@@ -97,7 +97,7 @@
|
||||
data-consume-amount="{{ $currentStockEntry->amount }}">
|
||||
<i class="fas fa-utensils"></i> {{ $L('All') }}
|
||||
</a>
|
||||
<a class="btn btn-success btn-sm product-open-button @if($currentStockEntry->amount <= 1 || $currentStockEntry->amount == $currentStockEntry->amount_opened) disabled @endif" href="#" data-toggle="tooltip" data-placement="left" title="{{ $L('Mark #3 #1 of #2 as open', FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name, 1) }}"
|
||||
<a class="btn btn-success btn-sm product-open-button @if($currentStockEntry->amount < 1 || $currentStockEntry->amount == $currentStockEntry->amount_opened) disabled @endif" href="#" data-toggle="tooltip" data-placement="left" title="{{ $L('Mark #3 #1 of #2 as open', FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name, 1) }}"
|
||||
data-product-id="{{ $currentStockEntry->product_id }}"
|
||||
data-product-name="{{ FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name }}"
|
||||
data-product-qu-name="{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name }}">
|
||||
@@ -137,7 +137,7 @@
|
||||
@endforeach
|
||||
</td>
|
||||
<td class="d-none">
|
||||
@if($currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime('-1 days')) && $currentStockEntry->amount > 0) expired @elseif($currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime("+$nextXDays days")) && $currentStockEntry->amount > 0) expiring @elseif (FindObjectInArrayByPropertyValue($missingProducts, 'id', $currentStockEntry->product_id) !== null) belowminstockamount @endif
|
||||
@if($currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime('-1 days')) && $currentStockEntry->amount > 0) expired @elseif($currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime("+$nextXDays days")) && $currentStockEntry->amount > 0) expiring @endif @if(FindObjectInArrayByPropertyValue($missingProducts, 'id', $currentStockEntry->product_id) !== null) belowminstockamount @endif
|
||||
</td>
|
||||
@php $productGroup = FindObjectInArrayByPropertyValue($productGroups, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->product_group_id) @endphp
|
||||
<td class="d-none">
|
||||
|
||||
24
yarn.lock
24
yarn.lock
@@ -7,9 +7,9 @@
|
||||
resolved "https://github.com/berrnd/bootstrap-combobox.git#fcf0110146f4daab94888234c57d198b4ca5f129"
|
||||
|
||||
"@fortawesome/fontawesome-free@^5.7.2":
|
||||
version "5.7.2"
|
||||
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.7.2.tgz#1498c3eb78ee7c78c5488418707de90aaf58d5d7"
|
||||
integrity sha512-Ha4HshKdCVKgu4TVCtG8XyPPYdzTzNW4/fvPnn+LT7AosRABryhlRv4cc4+o84dgpvVJN9reN7jo/c+nYujFug==
|
||||
version "5.8.1"
|
||||
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.8.1.tgz#cbafbfe8894c4e3e3c3a9da6774e249ac1f2da8b"
|
||||
integrity sha512-GJtx6e55qLEOy2gPOsok2lohjpdWNGrYGtQx0FFT/++K4SYx+Z8LlPHdQBaFzKEwH5IbBB4fNgb//uyZjgYXoA==
|
||||
|
||||
"TagManager@https://github.com/max-favilli/tagmanager.git#3.0.2":
|
||||
version "3.0.1"
|
||||
@@ -40,9 +40,9 @@ chart.js@2.7.1:
|
||||
moment "~2.18.0"
|
||||
|
||||
chart.js@^2.7.3:
|
||||
version "2.7.3"
|
||||
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.7.3.tgz#cdb61618830bf216dc887e2f7b1b3c228b73c57e"
|
||||
integrity sha512-3+7k/DbR92m6BsMUYP6M0dMsMVZpMnwkUyNSAbqolHKsbIzH2Q4LWVEHHYq7v0fmEV8whXE0DrjANulw9j2K5g==
|
||||
version "2.8.0"
|
||||
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.8.0.tgz#b703b10d0f4ec5079eaefdcd6ca32dc8f826e0e9"
|
||||
integrity sha512-Di3wUL4BFvqI5FB5K26aQ+hvWh8wnP9A3DWGvXHVkO13D3DSnaSsdZx29cXlEsYKVkn1E2az+ZYFS4t0zi8x0w==
|
||||
dependencies:
|
||||
chartjs-color "^2.1.0"
|
||||
moment "^2.10.2"
|
||||
@@ -238,9 +238,9 @@ moment@~2.18.0:
|
||||
integrity sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=
|
||||
|
||||
popper.js@^1.14.3:
|
||||
version "1.14.7"
|
||||
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.7.tgz#e31ec06cfac6a97a53280c3e55e4e0c860e7738e"
|
||||
integrity sha512-4q1hNvoUre/8srWsH7hnoSJ5xVmIL4qgz+s4qf2TnJIMyZFUFMGH+9vE7mXynAlHSZ/NdTmmow86muD0myUkVQ==
|
||||
version "1.15.0"
|
||||
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.15.0.tgz#5560b99bbad7647e9faa475c6b8056621f5a4ff2"
|
||||
integrity sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA==
|
||||
|
||||
startbootstrap-sb-admin@^4.0.0:
|
||||
version "4.0.0"
|
||||
@@ -260,9 +260,9 @@ summernote@^0.8.11:
|
||||
integrity sha512-j+YbSK2ox1RZGeD5E/+6k57bvqhQLxiaazSj9zHBXOJnCuc0LZPSIGwyTlMaAGWpo6FlkXfjGS93hEDkV3zVJw==
|
||||
|
||||
swagger-ui-dist@^3.21.0:
|
||||
version "3.21.0"
|
||||
resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-3.21.0.tgz#172bdd39d7d2efd4d4998411702ebe562a934631"
|
||||
integrity sha512-bAhzzpujhSIXdzpSI9b9RpvahC556lxcOIXxt1OOtTIasYodpy94gDlanQl4j7xavmi4nhaGiZ9iBcoFO+wHlA==
|
||||
version "3.22.0"
|
||||
resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-3.22.0.tgz#9f2417d774f21fac260b1497ead0650dc3e92861"
|
||||
integrity sha512-ZFcQoi4XT2t/NGKByVwmb4iERLtGmQQEFqHNC1PmdauWVZ2y80akkzctghgAftTlc8xpUp+I62nm4Km2q82ajQ==
|
||||
|
||||
"tempusdominus-bootstrap-4@https://github.com/berrnd/tempusdominus-bootstrap-4.git#master":
|
||||
version "5.1.2"
|
||||
|
||||
Reference in New Issue
Block a user