Stock Settings
The stock settings for the whole site: one record.
Area: The retailer's setup · Why it is here: guide chapter 04 · Fields: 41 · One record (a settings record): read it at its own name.
iVendNext's own description: Default settings for your stock-related transactions
Read and write it
Every call runs as your app's own user, with its key in one header, at the retailer's own address. The user reads and writes only what its role allows: your app's user, and the rights the retailer gives it.
Read a list (only name unless you ask for fields):
curl -s "https://⟨site⟩/api/resource/Stock%20Settings?fields=%5B%22*%22%5D&limit_page_length=20" \
-H "Authorization: token ⟨api key⟩:⟨api secret⟩"
Read one:
curl -s "https://⟨site⟩/api/resource/Stock%20Settings/⟨name⟩" -H "Authorization: token ⟨api key⟩:⟨api secret⟩"
Create one, if your app's role may:
curl -s -X POST "https://⟨site⟩/api/resource/Stock%20Settings" -H "Authorization: token ⟨api key⟩:⟨api secret⟩" \
-H "Content-Type: application/json" -d '{"⟨field⟩": …}'
Change one with PUT /api/resource/Stock%20Settings/⟨name⟩ and the fields you change; a table sent there replaces its rows, so send its existing rows too. All the record calls and their answers: the API reference.
Samples that use it
Fields
Read from the product at POS 2.1.0.667 (till app 60147699c): its own fields, the fields iVendNext adds to it, and iVendNext's changes to any of them. Read-only fields are set by iVendNext; a hidden one is not on the form but can be read. Every record also has name (its id, in the address), owner, creation, modified, modified_by and docstatus (0 a draft, 1 submitted, 2 cancelled), all read-only.
| Field | Field name | Type | Required | Read-only | Hidden | Links to |
|---|---|---|---|---|---|---|
| Item Naming By | item_naming_by |
Select | one of: Item Code, Naming Series | |||
| Default Valuation Method | valuation_method |
Select | one of: FIFO, Moving Average, LIFO | |||
| Default Item Group | item_group |
Link | Item Group | |||
| Default Warehouse | default_warehouse |
Link | Warehouse | |||
| Sample Retention Warehouse | sample_retention_warehouse |
Link | Warehouse | |||
| Default Stock UOM | stock_uom |
Link | UOM | |||
| Auto Insert Item Price If Missing | auto_insert_price_list_rate_if_missing |
Check | ||||
| Update Existing Price List Rate | update_existing_price_list_rate |
Check | ||||
| Allow to Edit Stock UOM Qty for Sales Documents | allow_to_edit_stock_uom_qty_for_sales |
Check | ||||
| Allow to Edit Stock UOM Qty for Purchase Documents | allow_to_edit_stock_uom_qty_for_purchase |
Check | ||||
| Over Delivery/Receipt Allowance (%) | over_delivery_receipt_allowance |
Float | ||||
| Over Transfer Allowance | mr_qty_allowance |
Float | ||||
| Over Picking Allowance | over_picking_allowance |
Percent | ||||
| Role Allowed to Over Deliver/Receive | role_allowed_to_over_deliver_receive |
Link | Role | |||
| Allow Negative Stock | allow_negative_stock |
Check | ||||
| Show Barcode Field in Stock Transactions | show_barcode_field |
Check | ||||
| Convert Item Description to Clean HTML in Transactions | clean_description_html |
Check | ||||
| Allow Internal Transfers at Arm's Length Price | allow_internal_transfer_at_arms_length_price |
Check | ||||
| Action If Quality Inspection Is Not Submitted | action_if_quality_inspection_is_not_submitted |
Select | one of: Stop, Warn | |||
| Action If Quality Inspection Is Rejected | action_if_quality_inspection_is_rejected |
Select | one of: Stop, Warn | |||
| Enable Stock Reservation | enable_stock_reservation |
Check | ||||
| Allow Partial Reservation | allow_partial_reservation |
Check | ||||
| Auto Reserve Stock for Sales Order on Purchase | auto_reserve_stock_for_sales_order_on_purchase |
Check | ||||
| Auto Reserve Serial and Batch Nos | auto_reserve_serial_and_batch |
Check | ||||
| Do Not Use Batch-wise Valuation | do_not_use_batchwise_valuation |
Check | ||||
| Auto Create Serial and Batch Bundle For Outward | auto_create_serial_and_batch_bundle_for_outward |
Check | ||||
| Pick Serial / Batch Based On | pick_serial_and_batch_based_on |
Select | one of: FIFO, LIFO, Expiry | |||
| Naming Series Prefix | naming_series_prefix |
Data | ||||
| Disable Serial No And Batch Selector | disable_serial_no_and_batch_selector |
Check | ||||
| Have Default Naming Series for Batch ID? | use_naming_series |
Check | ||||
| Use Serial / Batch Fields | use_serial_batch_fields |
Check | ||||
| Do Not Update Serial / Batch on Creation of Auto Bundle | do_not_update_serial_batch_on_creation_of_auto_bundle |
Check | ||||
| Allow existing Serial No to be Manufactured/Received again | allow_existing_serial_no |
Check | ||||
| Raise Material Request When Stock Reaches Re-order Level | auto_indent |
Check | ||||
| Notify by Email on Creation of Automatic Material Request | reorder_email_notify |
Check | ||||
| Allow Material Transfer from Delivery Note to Sales Invoice | allow_from_dn |
Check | ||||
| Allow Material Transfer from Purchase Receipt to Purchase Invoice | allow_from_pr |
Check | ||||
| Stock Frozen Upto | stock_frozen_upto |
Date | ||||
| Freeze Stocks Older Than (Days) | stock_frozen_upto_days |
Int | ||||
| Role Allowed to Create/Edit Back-dated Transactions | role_allowed_to_create_edit_back_dated_transactions |
Link | Role | |||
| Role Allowed to Edit Frozen Stock | stock_auth_role |
Link | Role |