# accounts-payable: the one question asked about each invoice. The state is a case file with the
# invoice, its purchase order, the receiving record, the vendor master, the vendor's recent
# invoices and the AP policy (ap_policy). Label names must match thresholds.yaml `labels`.

label:
  type: choice
  instructions: "An invoice has arrived for payment. Using `invoice`, `purchase_order`, `receiving`, `vendor_master`, `vendor_invoices_last_60_days` and the rules in `ap_policy`, what should accounts payable do with it now?"
  criteria:
    pay: "It matches its purchase order and, for goods, a receiving record for the full quantity billed; any price difference is within tolerance; the remit-to account matches a vendor master that has not changed recently; and it is not a repeat of an invoice already on file (a regular billing schedule covered by the PO is not a repeat)."
    hold-for-receipt: "Goods are billed that have not been received in full for the quantity billed, and nothing else is wrong with the invoice."
    price-variance: "The invoice exceeds the purchase order price by more than the policy tolerance of 2% or $50, whichever is greater."
    possible-duplicate: "An invoice already on file from this vendor looks like the same bill: the same invoice number in another format, or the same amount shortly before, with no billing schedule on the PO that explains it."
    vendor-change: "The remit-to bank account differs from the vendor master, or the vendor master's account changed within the last 30 days. Payment waits for a callback at a number already on file."
