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.dartlib/screens/stock/write_off_controller.dartlib/screens/stock/widgets/stock_item_picker_sheet.dartlib/screens/stock/widgets/stock_item_picker_controller.dart- Source
- elmermj/panly-app @ pre-staging-test (72aaffd)
API calls (3)
| Call | Why the screen makes it | Where in the app code |
|---|---|---|
GET /v1/ingredients/{ingredientId}Get ingredient |
Preselected ingredient from the route | lib/screens/stock/write_off_controller.dart:55lib/data/stock/stock_remote.dart:44 |
GET /v1/ingredientsList ingredients |
Stock item picker (q, cursor, pages) | lib/screens/stock/widgets/stock_item_picker_controller.dart:52lib/data/stock/stock_remote.dart:39 |
POST /v1/ingredients/{ingredientId}/wasteRecord waste (negative waste movement at avg cost) |
Record the write-off | lib/screens/stock/write_off_controller.dart:127lib/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.