Add stock items, groups and movements at a moving average cost

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
2026-11-26 16:18:59 +02:00
co-authored by Claude Sonnet 5.5
parent 361a2974cf
commit 30132deb0e
81 changed files with 4968 additions and 115 deletions
+189
View File
@@ -0,0 +1,189 @@
<?php
return [
'units' => [
'piece' => 'pcs',
'sheet' => 'sheet',
'roll' => 'roll',
'metre' => 'm',
'square_metre' => 'm²',
'litre' => 'l',
'package' => 'pack',
],
'kinds' => [
'purchase' => 'Purchase',
'consumption' => 'Use',
'write_off' => 'Write-off',
'adjustment' => 'Stock count correction',
'reversal' => 'Reversal',
],
'index' => [
'title' => 'Stock',
'intro' => 'Balances of stock items. Items to order (balance at or below the reorder level) and negative balances are marked.',
'search' => 'Search by name or code',
'group' => 'Item group',
'all_groups' => 'All groups',
'only_reorder' => 'Only items to order',
'include_inactive' => 'Also show items out of use',
'new_item' => 'New item',
'groups' => 'Item groups',
'none' => 'No items match.',
'count' => '{0} No items|{1} 1 item|[2,*] :count items',
'total_value' => 'Total stock value: :value',
],
'columns' => [
'name' => 'Item',
'group' => 'Group',
'balance' => 'Balance',
'reorder_level' => 'Reorder level',
'status' => 'Status',
'average_cost' => 'Average cost',
'value' => 'Value',
'time' => 'Time',
'kind' => 'Kind',
'quantity' => 'Quantity',
'balance_after' => 'Balance after',
'user' => 'Recorded by',
'target' => 'For',
'actions' => 'Actions',
],
'status' => [
'ok' => 'Enough',
'reorder' => 'To order',
'negative' => 'Negative balance',
'inactive' => 'Out of use',
],
'groups' => [
'title' => 'Item groups',
'intro' => 'Groups order the stock list and the material search of the machine console. Groups that have been used are not deleted but taken out of use.',
'new' => 'New group',
'name' => 'Group name',
'add' => 'Add group',
'items' => '{0} no items|{1} 1 item|[2,*] :count items',
'rename' => 'Rename',
'rename_named' => 'Rename: :name',
'save' => 'Save name',
'cancel' => 'Cancel',
'up_named' => 'Move up: :name',
'down_named' => 'Move down: :name',
'deactivate_named' => 'Take out of use: :name',
'activate_named' => 'Take into use: :name',
'deactivate' => 'Take out of use',
'activate' => 'Take into use',
'none' => 'No groups yet. Add the first group, e.g. Papers and boards.',
'added' => 'Group :name added.',
'renamed' => 'Group renamed: :name.',
'moved_up' => ':name moved up.',
'moved_down' => ':name moved down.',
'first' => ':name is already first.',
'last' => ':name is already last.',
'activated' => ':name taken into use.',
'deactivated' => ':name taken out of use.',
'back' => 'Back to stock',
],
'form' => [
'create_title' => 'New item',
'edit_title' => 'Edit item',
'group' => 'Item group',
'name' => 'Name',
'unit' => 'Unit',
'code' => 'Product code or barcode',
'code_hint' => 'Optional. A barcode scanner types the code into the search field.',
'supplier' => 'Supplier',
'reorder_level' => 'Reorder level',
'reorder_level_hint' => 'Optional. When the balance is at or below this, the item is shown as to order. At most three decimals.',
'image' => 'Image',
'image_hint' => 'An optional image that helps recognise the item on a touch screen. JPEG, PNG, WebP or GIF, at most :size MB.',
'remove_image' => 'Remove image',
'current_image' => 'Current image',
'save' => 'Save',
'cancel' => 'Cancel',
'no_groups' => 'Add an item group first.',
'created' => 'Item :name added.',
'updated' => 'Item :name saved.',
],
'item' => [
'details' => 'Details',
'balance' => 'Balance',
'edit' => 'Edit',
'deactivate' => 'Take out of use',
'activate' => 'Take into use',
'deactivated' => 'The item was taken out of use. It can no longer be used, but its movements are kept.',
'activated' => 'The item was taken into use.',
'inactive_note' => 'The item is out of use.',
'image_alt' => 'Image: :name',
'history' => 'Movement history',
'history_none' => 'No movements yet.',
'history_limit' => 'At most the :count newest movements are shown.',
'reverse' => 'Reverse',
'reverse_named' => 'Reverse movement :kind :quantity (:time)',
'reverse_title' => 'Reverse the movement?',
'reverse_text' => 'A reversal that cancels :kind :quantity is recorded for today. The original movement stays in the history.',
'reverse_confirm' => 'Record reversal',
'reversed' => 'Reversal recorded. Balance now :balance.',
'reversed_by' => 'Reversed (#:number)',
'reverses' => 'Reverses movement #:number',
'target_task' => 'Task #:id',
'target_machine' => 'Machine #:id',
'target_order' => 'Quick sale order',
'target_maintenance' => 'Maintenance',
'target_count' => 'Stock count #:id',
'document' => 'Document :number',
],
'purchase' => [
'title' => 'Record purchase',
'intro' => 'Goods received. Give the price without VAT either in total or per unit; the average cost is updated.',
'day' => 'Day',
'quantity' => 'Quantity (:unit)',
'total_price' => 'Total price (€, VAT 0)',
'unit_price' => 'Or unit price (€/:unit, VAT 0)',
'unit_price_hint' => 'At most four decimals, e.g. 0.0123.',
'supplier' => 'Supplier',
'document_number' => 'Purchase invoice or receipt number',
'save' => 'Record purchase',
'saved' => 'Purchase recorded: :quantity. Balance now :balance, average cost :cost.',
],
'write_off' => [
'title' => 'Record write-off',
'quantity' => 'Quantity (:unit)',
'reason' => 'Reason',
'reason_hint' => 'E.g. damaged, expired.',
'save' => 'Record write-off',
'saved' => 'Write-off recorded: :quantity. Balance now :balance.',
],
'use' => [
'title' => 'Record use without a target',
'intro' => 'Use with no task or machine (e.g. a test run). A task\'s material is recorded on the task.',
'quantity' => 'Quantity (:unit)',
'reason' => 'Reason',
'save' => 'Record use',
'saved' => 'Use recorded: :quantity. Balance now :balance.',
'negative_warning' => 'The balance is negative. Correct it with a purchase or a stock count.',
],
'errors' => [
'name' => 'Enter a name (1–150 characters).',
'name_taken' => 'The name is already in use.',
'group' => 'Choose an item group in use.',
'quantity' => 'Enter a quantity greater than zero, at most three decimals (e.g. 2.5).',
'reorder_level' => 'Enter the reorder level as a number, at most three decimals.',
'cost' => 'Enter a price in euros (e.g. 12.50) or a unit price with at most four decimals.',
'price_required' => 'Enter a total price or a unit price.',
'day' => 'Enter the day as dd.mm.yyyy.',
'reason' => 'Enter a reason.',
'inactive' => 'The item is out of use and cannot be used.',
'image' => 'The file is not a usable image (JPEG, PNG, WebP or GIF).',
'image_too_large' => 'The image is too large (at most :size MB).',
'not_found' => 'The row was not found. Refresh the page.',
'already_reversed' => 'The movement has already been reversed.',
'not_reversible' => 'A reversal or a stock count correction cannot be reversed.',
'reversal_not_allowed' => 'You can only undo your own use recorded today. Management makes other corrections.',
],
];