wotnak
6bb1e1789e
Add asset inventory views field #679
2023-05-16 14:30:01 -04:00
Michael Stenta
272e698e87
Issue #3310286 : Add $timestamp parameter to asset.inventory service methods
2022-12-15 14:06:30 -05:00
Michael Stenta
c787d7e256
Remove default_measure configuration from quantity type definitions #612
...
This was originally added so that the Price quantity type could set its
default measure to "value" all the time. This was back when price
quantities were part of farmOS core. It was then moved to the
farm_ledger contrib module, and is being refactored such that it will no
longer need to make use of this default_measure configuration.
2022-12-02 14:02:24 -05:00
Michael Stenta
728797f0f6
Remove dependency on farm_quantity_standard from farm_inventory.
2022-11-22 16:20:40 -05:00
Michael Stenta
bafd1f0132
Fix Call to deprecated function module_load_include().
2022-09-13 10:23:48 -04:00
Michael Stenta
1cd9df9fab
Fix "Access to an undefined property" PHPStan errors.
2022-09-13 10:23:48 -04:00
Michael Stenta
025e40c450
Fraction arithmetic no longer updates original Fraction object.
2021-12-01 19:44:29 -05:00
Michael Stenta
d3b3bd862d
Use upstream \Drupal\log\Event\LogEvent instead of custom event.
2021-10-18 15:23:26 -04:00
paul121
e79da002b5
Test that deleting an inventory adjustment updates the asset's inventory.
2021-10-18 10:54:28 -04:00
paul121
11344de38b
Use a LogEventSubscriber to invalidate asset cache on inventory changes.
2021-10-18 10:54:28 -04:00
paul121
b7984ec850
Add failing tests for asset inventory cache invalidation.
2021-10-18 10:47:24 -04:00
paul121
ee96a153d9
Render inventory information after the quantity in the format (@adjustment @asset inventory).
2021-09-15 15:35:40 -04:00
Michael Stenta
19e2c845c1
Translate inventory adjustment widget validation errors.
2021-09-15 15:35:40 -04:00
paul121
7cb61108b9
Add custom validation for quantity inventory values.
2021-09-15 15:35:40 -04:00
paul121
e9caab4e4a
Hide the inventory asset field until an inventory adjustment is selected.
2021-09-15 15:35:40 -04:00
paul121
b236424bc0
Default the quantity inventory_adjustment to N/A.
2021-09-15 15:35:40 -04:00
Michael Stenta
3b68509613
The farm_inventory_test module no longer needs to provide bundle plugin classes or a mock quantity field.
2021-07-22 17:40:16 -04:00
Michael Stenta
cdfe4dc5a4
Move log quantity base field definition to farm_log_quantity module.
...
The farm_inventory module had an implicit dependency on this
field, so by moving this out to its own module we can depend
on it explicitly without adding a dependency on farm_entity
as a whole.
2021-07-22 17:40:16 -04:00
Michael Stenta
380796b4c8
Move FarmBrowserTestBase to a farm_test module.
2021-06-17 09:42:43 -04:00
Michael Stenta
b5f5a1da8f
Add an Inventory field formatter and display current inventory on asset pages.
2021-03-27 14:44:42 -04:00
Michael Stenta
ca456b906d
Add automated tests of the inventory computed field in JSON:API.
2021-03-27 14:43:53 -04:00
Michael Stenta
046de970e0
Invalidate asset cache when an inventory adjustment that references it is saved or deleted.
2021-03-27 14:43:53 -04:00
Michael Stenta
e973a2bd73
If the asset is new, it won't have inventory, so getInventory() can bail early.
2021-03-27 14:43:53 -04:00
Michael Stenta
7c6b543ff1
Add a computed Inventory field to assets.
2021-03-27 14:43:53 -04:00
Michael Stenta
94546a0826
Define Inventory field type schema.
2021-03-25 18:42:03 -04:00
Michael Stenta
2526d69488
Output the units as a term label, rather than a term ID.
2021-03-25 18:42:03 -04:00
Michael Stenta
29cfef230a
Add automated tests for assets with multiple inventories.
2021-03-25 18:42:03 -04:00
Michael Stenta
ee84726112
Initial inventory automated tests.
2021-03-25 18:42:03 -04:00
Michael Stenta
4064c4f84f
Initial asset.inventory service.
2021-03-25 18:42:03 -04:00
Michael Stenta
f9e7b8883d
Revert "Create an entity browser for inventory assets."
...
This reverts commit 3bb4613a445da64364899ce5aaa1a4a2b4df9805.
2021-03-25 18:42:03 -04:00
Michael Stenta
dd0b75592a
Revert "Start an entity_browser view that displays inventory asset options."
...
This reverts commit 53ccab74073ab4a8f8728e839a3447296bc03607.
2021-03-25 18:42:03 -04:00
Michael Stenta
e952ca952a
Refactor/rename inventory fields. Use farm.field_factory.
2021-03-25 18:41:52 -04:00
Michael Stenta
4eb303c77c
Replace references to farm_quantity with quantity.
2021-03-25 18:31:09 -04:00
paul121
42079f795d
Change the quantity.asset form display to use the inventory_assets entity browser.
2021-03-25 18:31:09 -04:00
paul121
029579a7f3
Create an entity browser for inventory assets.
2021-03-25 18:31:09 -04:00
paul121
5fcda12c31
Start an entity_browser view that displays inventory asset options.
2021-03-25 18:31:09 -04:00
paul121
9479eecdfc
Add inventory base fields to farm_quantity entity.
2021-03-25 18:31:09 -04:00
paul121
44cfb7e92e
Init farm_inventory module.
2021-03-25 18:31:09 -04:00