Panly API docsstaging

Screens / Write-off

Write-off

Write off spoiled or wasted ingredient stock. Loads only the preselected item; others come from the paged stock item picker.

App routes
/stock/write-off
Access
stock.manage
Screen code
lib/screens/stock/write_off_page.dart
lib/screens/stock/write_off_controller.dart
lib/screens/stock/widgets/stock_item_picker_sheet.dart
lib/screens/stock/widgets/stock_item_picker_controller.dart
Source
elmermj/panly-app @ pre-staging-test (72aaffd)

API calls (3)

CallWhy the screen makes itWhere in the app code
GET /v1/ingredients/{ingredientId}
Get ingredient
Preselected ingredient from the route lib/screens/stock/write_off_controller.dart:55
lib/data/stock/stock_remote.dart:44
GET /v1/ingredients
List ingredients
Stock item picker (q, cursor, pages) lib/screens/stock/widgets/stock_item_picker_controller.dart:52
lib/data/stock/stock_remote.dart:39
POST /v1/ingredients/{ingredientId}/waste
Record waste (negative waste movement at avg cost)
Record the write-off lib/screens/stock/write_off_controller.dart:127
lib/data/stock/stock_remote.dart:62

Each call links to its operation in the API reference. Code locations are file:line in panly-app at 72aaffd, listed from the screen down to the line that sends the request.