Skip to main content

Purchase orders

A purchase order (PO) is what a supplier sends to a vendor when buying stock. It is the mirror image of a sale: the supplier places it, the goods arrive, the supplier marks it Delivered, and the stock on hand and the cost of each product are updated. The vendor's bill for it is the PO invoice.

Who uses it​

  • Supplier staff place purchase orders, correct them, receive the goods, return goods to the vendor and cancel orders.
  • Vendors are businesses the supplier buys from. See Vendors. A vendor's own people can open a purchase order addressed to them but cannot change it.

A purchase order's life at a glance​

StatusWhat the supplier doesWhat happens
PendingPlaces the order. Edits lines, notes and discountNothing moves in stock. A due date exists as soon as an invoice date is known
DeliveredMarks it delivered (every catch-weight line is weighed)Quantities go into stock and the product's average cost is updated. The due date can be set from delivery
Pending againReverts a delivery by mistakeThe delivery's effect on stock and cost is undone. Payments and returns stay
CanceledCancels a Pending or Delivered orderFinal. Stock is put back as it was, and payments are reversed

The app calls an order that has not been delivered Pending.

In this section​

PageWhat it covers
Purchase order listTabs, search, date range and the order queue
New purchase orderChoosing a vendor, adding products and placing the order
Purchase order detailEditing lines, notes and weights, and moving the order along
Pricing & discountsUnit price, line totals, the one-time discount and the order total
Reference numbers & datesThe PO number, the vendor's reference number, invoice date and due date
Statuses & deliveryDelivering, reverting a delivery, canceling and deleting
Stock & cost effectsWhat delivery, reversal, cancelation and returns do to stock and average cost
Returns to vendorsSending delivered goods back, and how the credit is capped

Catch-weight products follow their own rules: see Catch-weight purchase orders.

Where it shows up​

  • Supplier app: Purchase Orders list and detail, the Place New Purchase Order dialog, PO invoices, and a product's stock history.
  • PDF: the purchase order's invoice, printed or downloaded from the detail page.

Permissions​

ActionNeeds
See the Purchase Orders pagePurchase orders: read or full access
Place, edit, deliver, revert, cancel, return, add a discountPurchase orders: full access

Changing an order also requires belonging to the buying business. Members of the vendor's business can read an order addressed to them and nothing more.

Decisions​

  • A PO's due date is dated from its invoice date, not from delivery, whenever an invoice date is known. A PO with an invoice date and vendor terms is payable before the goods arrive.
  • Delivery can be undone, repeatedly, without drift. The stock and cost effects are read back from what the delivery actually wrote, so reverting and re-delivering any number of times nets out.
  • PO money rounds at the line, then sums, and a unit price can carry up to 4 decimals. See Pricing & discounts.

Specs​

purchase-order-delivery-reversal.feature
# prefix: PDR
Feature: Purchase Order Delivery Reversal
A supplier who marked a purchase order delivered by mistake can return it to placed,
correct it, and mark it delivered again. Reversing undoes the delivery's effect on
stock on hand and average cost, and may be repeated any number of times without the
effects compounding.

Background:
Given a supplier has placed a purchase order with a vendor

Rule: Only a delivered purchase order can be reversed

Scenario: PDR-001 supplier returns a delivered purchase order to placed
Given the purchase order is delivered
When the supplier reverses the delivery
Then the purchase order is placed
And the supplier can edit its items

Scenario Outline: PDR-002 reversal is rejected when the purchase order is <state>
Given the purchase order is <state>
When the supplier attempts to reverse the delivery
Then the reversal is rejected
And the purchase order is unchanged

Examples:
| state |
| placed |
| canceled |

Scenario: PDR-003 reversal is rejected for a purchase order that no longer exists
Given the purchase order has been removed
When the supplier attempts to reverse the delivery
Then the reversal is rejected

Rule: Reversing a delivery undoes its effect on stock on hand

Scenario: PDR-004 stock on hand returns to its pre-delivery level
Given the supplier held 10 units of a product
And a purchase order for 10 more units was delivered
When the supplier reverses the delivery
Then the supplier holds 10 units of that product

Scenario: PDR-005 inventory history records both the delivery and the reversal
Given a delivered purchase order
When the supplier reverses the delivery
Then the inventory history still shows the original delivery
And the inventory history shows the reversal as a separate movement

Scenario: PDR-006 stock on hand may fall below zero when the goods were already sold on
Given a purchase order for 10 units was delivered
And 12 of those units have since been sold
When the supplier reverses the delivery
Then the reversal is accepted
And the supplier's stock on hand for that product is negative

Scenario: PDR-007 both unit count and total weight are restored for weighed products
Given a delivered purchase order for a product sold by weight
When the supplier reverses the delivery
Then the supplier's unit count returns to its pre-delivery level
And the supplier's total weight on hand returns to its pre-delivery level

Rule: Reversing a delivery undoes its effect on average cost

Scenario: PDR-008 average cost returns to its pre-delivery value
Given the supplier held 10 units at an average cost of $5.00
And a purchase order for 10 units at $8.00 each was delivered
And the average cost became $6.50
When the supplier reverses the delivery
Then the average cost is $5.00

Scenario: PDR-009 average cost reflects a corrected price after re-delivery
Given a purchase order for 10 units at $8.00 each was delivered and then reversed
When the supplier corrects the price to $6.00 and marks it delivered again
Then the average cost reflects $6.00 per unit
And the average cost carries no trace of the original $8.00

Scenario: PDR-010 average cost is cleared when no stock remains on hand
Given the supplier held no stock of a product
And a purchase order for that product was delivered
When the supplier reverses the delivery
Then the supplier holds no stock of that product
And the average cost is zero

Rule: Items already returned to the vendor are not reversed twice

Scenario: PDR-011 only the quantity still held is removed
Given a purchase order for 10 units was delivered
And 3 of those units were returned to the vendor
When the supplier reverses the delivery
Then 7 units are removed from stock on hand
And the purchase order has no remaining effect on stock on hand

Scenario: PDR-012 re-delivering restores only the quantity still held
Given a purchase order for 10 units with 3 returned to the vendor was reversed
When the supplier marks it delivered again
Then 7 units are added to stock on hand

Scenario: PDR-013 a fully returned line moves no stock when reversed
Given a purchase order line was delivered and then returned to the vendor in full
When the supplier reverses the delivery
Then no stock movement is recorded for that line

Scenario: PDR-014 canceling a delivered purchase order also accounts for returned items
Given a purchase order for 10 units was delivered
And 3 of those units were returned to the vendor
When the supplier cancels the purchase order
Then 7 units are removed from stock on hand
And the average cost is adjusted for the removal

Rule: Reversal and re-delivery may repeat without compounding

Scenario: PDR-015 repeated cycles leave the same result as a single delivery
Given a purchase order was delivered
When the supplier reverses and re-delivers it three times
And the purchase order is left delivered
Then stock on hand matches a single delivery of that purchase order
And the average cost matches a single delivery of that purchase order

Scenario: PDR-016 a purchase order left reversed has no net effect
Given a purchase order was delivered
When the supplier reverses and re-delivers it three times
And the purchase order is left placed
Then the purchase order has no net effect on stock on hand
And the purchase order has no net effect on the average cost

Scenario: PDR-017 two simultaneous reversals take effect only once
Given a delivered purchase order
When two reversals of the same delivery are attempted at the same time
Then only one reversal takes effect
And stock on hand is reduced only once

Rule: Order history and payments are preserved

Scenario: PDR-018 the date the order was placed is preserved
Given a delivered purchase order placed on a known date
When the supplier reverses the delivery
Then the date the order was placed is unchanged

Scenario: PDR-019 the delivery date is cleared
Given a delivered purchase order
When the supplier reverses the delivery
Then the purchase order has no delivery date

Scenario: PDR-020 payments already recorded are preserved
Given a delivered purchase order that has been paid in full
When the supplier reverses the delivery
Then the payment remains recorded against the purchase order
And the purchase order is still shown as paid

Rule: A payment due date exists as soon as its anchor date is known

Scenario: PDR-021 a due date is available before delivery when an invoice date is known
Given a placed purchase order with an invoice date and payment terms
Then the purchase order has a payment due date

Scenario: PDR-022 the invoice date takes precedence over the delivery date
Given a delivered purchase order with both an invoice date and a delivery date
Then the payment due date is calculated from the invoice date

Scenario: PDR-023 the due date is unaffected by reversal when an invoice date is known
Given a delivered purchase order with an invoice date
When the supplier reverses the delivery
Then the payment due date is unchanged

Scenario: PDR-024 without an invoice date the due date is recalculated on re-delivery
Given a delivered purchase order with no invoice date
When the supplier reverses the delivery and marks it delivered again later
Then the payment due date is calculated from the later delivery date

Scenario: PDR-025 no due date exists without an invoice date or a delivery
Given a placed purchase order with no invoice date
Then the purchase order has no payment due date

Rule: Only the buying business may reverse a delivery

Scenario: PDR-026 the buying business can reverse a delivery
Given a delivered purchase order
When a member of the buying business reverses the delivery
Then the reversal is accepted

Scenario: PDR-027 the selling business cannot reverse a delivery
Given a delivered purchase order
When a member of the selling business attempts to reverse the delivery
Then the reversal is rejected

Rule: Reporting reflects only genuine sales and purchases

Scenario: PDR-028 average selling price ignores reversed deliveries
Given 10 units of a product were sold at $12.00 each
And a delivered purchase order for 10 units of that product was reversed
Then the average selling price for that product is $12.00

Scenario: PDR-029 average selling price ignores items returned to a vendor
Given units of a product were sold
And other units of that product were returned to a vendor
Then the average selling price reflects only the units sold

Scenario: PDR-030 average cost nets a reversed delivery against its original
Given a purchase order for 10 units at $8.00 was delivered, reversed, corrected to $6.00, and delivered again
Then the reported average cost for that product is $6.00

Scenario: PDR-031 last purchase price falls back to the previous delivered order
Given two purchase orders for the same product were delivered at different prices
When the supplier reverses the more recent delivery
Then the last purchase price for that product is the earlier order's price

Rule: A reversal that cannot complete changes nothing

Scenario: PDR-032 a failed reversal leaves the purchase order delivered
Given a delivered purchase order
When the supplier reverses the delivery and the reversal cannot complete
Then the purchase order is still delivered
And stock on hand is unchanged
And the supplier can attempt the reversal again

Known limitations​

  • Only the Pending status can be edited in the app. After delivery, lines are locked; use a return or revert the delivery.
  • A delivered order cannot be deleted. Cancel it instead.

FAQ​

I marked an order delivered by mistake. Can I take it back? Yes: ⋮ → Revert to Previous Status. See Reverting a delivery.

Why can't I mark an order Delivered? A catch-weight line has no weight yet. Enter the weights first. See Catch-weight purchase orders.

Why can't I change the lines any more? Lines can be changed only while the order is Pending. See Purchase order detail.