3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00
Commit graph

2908 commits

Author SHA1 Message Date
Michael Stenta
efb3c20073 Add functions for loading quantity data for a specific asset, optionally given a measure and/or label. 2017-11-24 20:56:32 -05:00
Michael Stenta
6a1f70fd73 Allow multiple quantities to be entered on each log. Hide initial form and require user to add first item. 2017-11-24 20:56:32 -05:00
Michael Stenta
e92d6f4fec Add a Label field to Quantities. 2017-11-24 20:56:32 -05:00
Michael Stenta
ee6e0d264a Update Quantity field instance descriptions to include Measure. 2017-11-24 20:56:32 -05:00
Michael Stenta
1c29669b37 Add a function that defines the available options for the Measure field. 2017-11-24 20:56:32 -05:00
Michael Stenta
d309c509a7 Add a Measure field to Quantities. 2017-11-24 20:56:32 -05:00
Michael Stenta
782a190af8 Merge branch 'farm_asset_property' into 7.x-1.x 2017-11-24 20:56:08 -05:00
Michael Stenta
91160a7b3d Add an index on 'name' and 'value' columns in {farm_asset_property}. 2017-11-24 20:55:50 -05:00
Michael Stenta
539a52f0aa Change asset property database value column to a varchar. 2017-11-24 20:55:50 -05:00
Michael Stenta
ce4b3c1485 Allow a default value to be set when getting an asset property (similar to variable_get()). 2017-11-24 20:55:50 -05:00
Michael Stenta
32d4a01d0e Implement hook_entity_delete() to clean up asset properties if an asset is deleted. 2017-11-24 20:55:50 -05:00
Michael Stenta
773605951c Add functions for getting, setting, deleting, and checking whether or not a property is set. 2017-11-24 20:55:50 -05:00
Michael Stenta
f1e75d5ba4 Initial commit: provide a {farm_asset_property} key/value database table. 2017-11-14 13:52:30 -05:00
Michael Stenta
15317817f3 Merge branch 'farm_ui_tweaks' into 7.x-1.x 2017-11-14 13:45:48 -05:00
Michael Stenta
b327a64eae Minor doc fix in hook_farm_ui_entity_view_groups(). 2017-11-14 13:45:37 -05:00
Michael Stenta
3a61454104 Do not allow collapsing farm_ui groups. 2017-11-14 13:45:37 -05:00
Michael Stenta
cf84a3af07 Put all log Views in the "logs" farm_ui group and change the group name to "Logs by type". 2017-11-14 13:45:37 -05:00
Michael Stenta
0116ee4d41 Put asset children View in the "assets" farm_ui group. 2017-11-14 13:45:37 -05:00
Michael Stenta
a6da002c62 Add a group for "Logs with special purpose" and put movement and inventory logs in there via farm_ui. 2017-11-14 13:45:37 -05:00
Michael Stenta
67034ecba3 Change "Logs with [movements/inventory]" to "Logs of [movements/inventory]". 2017-11-14 13:45:20 -05:00
Michael Stenta
db0a9edae7 Merge branch 'farm_livestock_inventory' into 7.x-1.x 2017-11-14 13:44:32 -05:00
Michael Stenta
181e157b78 Remove feeds tamper that makes animal sex field required. 2017-11-14 13:44:22 -05:00
Michael Stenta
515f2cb27e Improvements to asset form help text to support non-individual animals. 2017-11-14 13:44:22 -05:00
Michael Stenta
c79cc63c59 Move Animal birthdate, sex, castrated, and nickname fields to new Individual fieldset. Make sex field optional. 2017-11-14 13:44:22 -05:00
Michael Stenta
cc534563ad Add inventory column to Animals list. 2017-11-14 13:44:22 -05:00
Michael Stenta
e340995f64 Enable inventory tracking for animal assets, and treat them as individuals by default. 2017-11-14 13:44:22 -05:00
Michael Stenta
2e20cd1217 Issue #2912091: Farm Inventory 2017-11-14 13:43:25 -05:00
Michael Stenta
a429d6b79d Use fraction::subtract() method in farm_inventory_set(). 2017-11-14 13:43:11 -05:00
Michael Stenta
465172c888 Fix comment. 2017-11-14 13:43:11 -05:00
Michael Stenta
c0cd29b5de Minor comment fixes. 2017-11-14 13:43:11 -05:00
Michael Stenta
529c882f18 Remove $asset_filter parameter from farm_log_asset_query() because it is no longer necessary. 2017-11-14 13:43:11 -05:00
Michael Stenta
7563441108 Use farm_log_query() directly in farm_inventory_query(), since it performs its own asset join. 2017-11-14 13:43:11 -05:00
Michael Stenta
2002a3bc0e Further abstract farm_log_asset_query() by creating an even more general farm_log_query(). 2017-11-14 13:43:11 -05:00
Michael Stenta
d37c84c78e Use farm_log_asset_query() to build inventory query. 2017-11-14 13:43:11 -05:00
Michael Stenta
89435b551f Generalize the query function for selecting logs that reference an asset, so farm_inventory can use it. 2017-11-14 13:43:11 -05:00
Michael Stenta
11799bdf7e Add Views field handler for asset inventory value. 2017-11-14 13:43:11 -05:00
Michael Stenta
87f053cb4f Create function for formatting inventory values. 2017-11-14 13:43:11 -05:00
Michael Stenta
8f8e420766 Add an Inventory field to asset edit form that allows setting the current inventory (via programatic log creation). 2017-11-14 13:43:11 -05:00
Michael Stenta
3312a1862e Add a function for programatically creating a log that sets the current inventory level. 2017-11-14 13:43:11 -05:00
Michael Stenta
0fca8f5e80 Use farm_inventory_entityreference_view for selecting assets in inventory adjustment. 2017-11-14 13:43:11 -05:00
Michael Stenta
8a3c836965 Create an Entity Reference View for selecting assets that have inventory enabled. 2017-11-14 13:43:11 -05:00
Michael Stenta
0a2b5aca2f Add custom Views asset type filter handler that only includes types with inventory enabled. 2017-11-14 13:43:11 -05:00
Michael Stenta
6055054b19 Add a function that returns a list of asset types with inventory enabled. 2017-11-14 13:43:11 -05:00
Michael Stenta
7c5751c851 Add Views integration for {farm_inventory_asset_type} table. 2017-11-14 13:43:11 -05:00
Michael Stenta
4450218403 Show "logs with inventory adjustments" on asset pages. 2017-11-14 13:43:11 -05:00
Michael Stenta
8ff76032c5 Add a View of "logs with inventory adjustments". 2017-11-14 13:43:11 -05:00
Michael Stenta
41c9c9e516 Default the inventory of "individual" assets to 1. 2017-11-14 13:43:11 -05:00
Michael Stenta
9360563ed8 Only display inventory if it is enabled for assets. 2017-11-14 13:43:11 -05:00
Michael Stenta
7f7c9b399c Add functions that check if inventory management is enabled on an asset, and whether or not to treat an asset as an individual by default. 2017-11-14 13:43:11 -05:00
Michael Stenta
a3e945faad Alter asset type form to show inventory settings. 2017-11-14 13:43:11 -05:00