Skip to content

marloth-tech/qr-request-app

Repository files navigation

Preview

APK download: https://dl.marloth.tech/wjPk1h

qr-request-app

This APP is used to interact with APIs via a physical QR-Code.

The url and authentication for the request are saved in the app. You also have to enter a json-template, of what you expect the request to look like.

The QR-Code is then only used to change values from that template.

e.g. to create a material request in ERPnext you would enter:

url: https://<yourerpnext.com>/api/resource/Material%20Request token: xxxxxxxxxxx:yyyyyyyyyyyyyy

{
  "data": {
  "naming_series": "MAT-MR-.YYYY.-",
  "material_request_type": "Purchase",
  "status": "Pending",
  "items":[{
    "item_code": "STO-ITEM-2020-00001",
    "schedule_date": "2020-12-10",
    "qty": 1}]
  }
}

The QR-codes are then only used to change the item_code and quantity. They might look like:

{"data": {"item_code": "STO-ITEM-2020-00002", "qty" : 100}}

example qr

variables in the template function

{{ today }} will be replaced with todays date in the format YYYY-MM-DD