Skip to main content

supplyNextPONumber

Returns the purchase order number a new purchase order would receive right now, derived from the company's configured PO number template.

Authentication

Requires authentication and the supply:read_pos permission.

Behavior

  • The number is a preview, not a reservation. Nothing is written and no counter advances, so repeated calls return the same number until a purchase order claims it.
  • Because it is not reserved, a purchase order created in the meantime can take this number first. Display it as the next available number rather than as a number already belonging to the caller.
  • Omit poNumber when creating the purchase order to receive the number the server assigns at that moment. Submitting this value back reintroduces the race it is subject to.
supplyNextPONumber: NextPONumber!

Type

NextPONumber object purchase-orders

The purchase order number a new purchase order would receive right now.