View Issue Details

IDProjectCategoryView StatusLast Update
0011415Talermerchant backendpublic2026-06-06 22:06
Reportersebasjm Assigned ToChristian Grothoff Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeveritymajorReproducibilityalways
Status informingResolutionfixed 
Product Versiongit (master) 
Target Version1.6Fixed in Version1.6 
Summary0011415: outofstock response makes no sense [2h]
Descriptioncreate product with stock 10
create an order with 1 item, i didnt pay it
create a new order with 10 items

expected: outofstock with available_quantity 9
got available_quantity 10

the response 410 is ok but the content is not right


curl 'https://merchant.taler/private/orders' \
  -H 'Authorization: Bearer secret-token:K7CA85NRKN38NKT2DNSGG0SVEQVKP29H4B3D29G81EQY54QTMPW0' \
  --data-raw '{"order":{"version":0,"amount":"CHF:10","summary":"sd","products":[],"pay_deadline":{"t_s":1779104124},"refund_deadline":{"t_s":1779104184},"wire_transfer_deadline":{"t_s":1779104244}},"inventory_products":[{"product_id":"we","quantity":10}],"create_token":true}'

{
  "product_id": "we",
  "requested_quantity": 10,
  "unit_requested_quantity": "10",
  "available_quantity": 10,
  "unit_available_quantity": "10"
}
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2026-05-19 07:31

manager   ~0028650

Ah, the code does NOT include locked in the calculations!

Christian Grothoff

2026-05-19 07:34

manager   ~0028651

See "taler-merchant-httpd_post-private-orders.c::compute_available_quantity". It does not even get the locked amounts (from merchant_inventory_locks) as an input!

Christian Grothoff

2026-06-06 22:06

manager   ~0028796

3674e660..1030eb67 adds tracking of the number of currently locked products and includes that when calculating the remaining stock in the response.

Issue History

Date ModifiedUsernameFieldChange
2026-05-18 12:05sebasjmNew Issue
2026-05-19 07:23Christian GrothoffAssigned To => Christian Grothoff
2026-05-19 07:23Christian GrothoffStatusnew => assigned
2026-05-19 07:31Christian GrothoffNote Added: 0028650
2026-05-19 07:34Christian GrothoffNote Added: 0028651
2026-05-19 07:36Christian GrothoffStatusassigned => implementing
2026-05-19 07:36Christian GrothoffTarget Version1.6 => 1.8
2026-05-19 07:36Christian GrothoffSummaryoutofstock response makes no sense => outofstock response makes no sense [2h]
2026-06-04 15:44Christian GrothoffStatusimplementing => assigned
2026-06-06 22:06Christian GrothoffNote Added: 0028796
2026-06-06 22:06Christian GrothoffStatusassigned => informing
2026-06-06 22:06Christian GrothoffResolutionopen => fixed
2026-06-06 22:06Christian GrothoffFixed in Version => 1.6
2026-06-06 22:06Christian GrothoffTarget Version1.8 => 1.6