Magento_PurchaseOrder

Magento Modules:

  • Magento_PurchaseOrder
  • Magento_PurchaseOrderGraphQl
  • Magento_PurchaseOrderRule
  • Magento_PurchaseOrderRuleGraphQl
  • Magento_CheckoutAgreementsPurchaseOrder
  • Magento_PaypalPurchaseOrder

Only Magento_PurchaseOrder and Magento_PurchaseOrderRule have storefront affecting logic/output.

Magento_CheckoutAgreementsPurchaseOrder affects checkout only (along with Magento_PurchaseOrder).

Adobe Commerce Packages

  • magento/module-purchase-order
  • magento/module-purchase-order-graph-ql
  • magento/module-purchase-order-rule
  • magento/module-purchase-order-rule-graph-ql
  • magento/module-checkout-agreements-purchase-order
  • magento/module-paypal-purchase-order

Repository

Note: this repo is only accessible with a Hyvä Enterprise license or as a contributor.

For more details, see: https://www.hyva.io/hyva-enterprise.html.

https://gitlab.hyva.io/hyva-enterprise/b2b/magento2-ee-magento-purchase-order

Features

All points are rated according to priority as P1 (critical), P2 (important), P3 (minor).

  • basic - does not break layout/design

Note: this issue is for features related to the main Hyvä Theme only. See #119 for details on Hyvä Checkout compatibility. All checkout features are also supported using the fallback Luma checkout.

PO is used as an abbreviation for Purchase Order. Any item with a prefix of [rule] denotes the feature comes from the Magento_PurchaseOrderRule module. All other items are for the main Magento_PurchaseOrder module.

Note: All below features assume output only if company accounts and purchase orders are enabled in Stores > Configuration: btob/website_configuration/company_active / btob/website_configuration/purchaseorder_enabled along with purchase orders being enabled for the company.

Global - Customer Account Header

Completed features (click to expand items checklist)
  • [P2] Add 'My Purchase Orders' when logged in
    • [P3] Visible with relevant permissions only (view/create POs)

Cart (/checkout/cart/)

Completed features (click to expand items checklist)
  • [P3] Remove coupon code field (when special layout handle applied: checkout_cart_index_remove_coupon)

Can't find where this is ever applied in code, but layout file re-implemented to cover.

Purchase Order Success Page (/purchaseorder/purchaseorder/success)

Completed features (click to expand items checklist)
  • [P1] Display PO approval notice (header / text)
  • [P2] Link to created PO (with PO #)
  • [P3] 'Continue Shopping' button (goes to homepage)

Customer Account Area (all pages)

Completed features (click to expand items checklist)
  • [P1] Add 'My Purchase Orders' menu item
    • [P2] Visible with relevant permissions only (view/create POs)
  • [P1] [rule] Add 'Approval Rules' menu item
    • [P2] Visible with relevant permissions only (view/create POs)

Purchase Order Listing Page (/purchaseorder/purchaseorder/)

Completed features (click to expand items checklist)
  • [P1] Accessible with relevant permissions only

My Purchase Orders Tab

  • [P1] Purchase orders table
    • PO #, Order #, Created, Updated, Created By, Status, Total and Action columns
  • [P1] Link to each PO detail page
  • [P2] Pagination works
  • [P2] Limiter works

Company Purchase Orders Tab

  • [P1] Visible with relevant permissions only (view subordinate / all company POs)
    • Plus one or more of these orders exist
  • [P1] Purchase orders table
    • PO #, Order #, Created, Updated, Created By, Status, Total and Action columns
  • [P1] Link to each PO detail page
  • [P2] Pagination works
  • [P2] Limiter works
  • [P2] Select/deselect individual POs
  • [P2] Select/deselect all POs
  • [P3] Selected purchase orders count (total)
  • [P2] Disable selection for approved POs
  • [P2] Approve selected POs
    • [P3] Modal confirmation
  • [P2] Reject selected POS
    • [P3] Modal confirmation
Approve/Reject Modal
  • [P3] Show confirmation message
  • [P3] Confirm/submit
  • [P3] Cancel/close

Requires My Approval Tab

  • [P1] [rule] Visible with relevant permissions only (can view company POs) and approval rules set up that require current users role to approve
    • Plus one or more of these orders exist
  • [P2] [rule] Show number of POs requiring approval in tab title
  • [P1] [rule] Purchase orders table
    • PO #, Order #, Created, Updated, Created By, Status, Total and Action columns
  • [P1] [rule] Link to each PO detail page
  • [P2] [rule] Pagination works
  • [P2] [rule] Limiter works
  • [P2] [rule] Select/deselect individual POs
  • [P2] [rule] Select/deselect all POs
  • [P2] [rule] Selected purchase orders count (total)
  • [P2] [rule] Disable selection for approved POs
  • [P2] Approve selected POs
    • [P3] Modal confirmation
  • [P2] Reject selected POS
    • [P3] Modal confirmation
Approve/Reject Modal
  • [P3] Show confirmation message
  • [P3] Confirm/submit
  • [P3] Cancel/close
Unsupported features (click to expand items checklist)
  • [P3] Column sorting on tables

May be implemented in future, dependent on demand/usefulness

Purchase Order View (/purchaseorder/purchaseorder/view/request_id/{id}/)

Completed features (click to expand items checklist)
  • [P1] Visible with relevant permissions only (view/create POs)

Header Area

  • [P1] Show PO # and status
  • [P2] Output and link to quote (if PO was created from a negotiable quote)
  • [P2] Output and link to order (if order has been placed from PO)
  • [P2] Show PO created date and company user (customer) that created it
  • [P2] Add PO items to shopping cart link*

*There is a bug with negotiable quotes here that lets you reorder items at the quoted price (this is disabled on orders, i.e. reorder links are removed) - this is a default Magento (Luma) issue, not Hyvä specific

Info Tabs

PO items Tab
  • [P1] Show item list
    • Name, SKU, Price, Qty, Subtotal columns
  • [P1] Show totals
    • Ensure to consider tax variances and discounts
Approval Flow Tab
  • [P1] [rule] Visible only when approval rules are set up for the role of user that placed the PO and the PO meets the conditions of one or more rule
  • [P1] [rule] Output rule name
  • [P1] [rule] Output rule status (icon) and message

Note: there can be multiple rules and multiple approvers per rule, each with different statuses

Comments Tab
  • [P2] Show all previously submitted comments for the PO

UX improvement consideration: only display when a comment has been left (like approval flow tab)

History Log Tab
  • [P2] Show all updates made for the PO
    • Date, time, comment, user

Shipping & Payment Info

  • [P1] Show shipping address
    • [P3] Telephone should be a link (:tel)
  • [P1] Show shipping method
  • [P1] Show billing address
    • [P3] Telephone should be a link (:tel)
  • [P1] Show payment method

Comment

  • [P2] Add a comment to PO

PO Actions

  • [P1] Visible with relevant permissions only (can approve POs)
  • [P1] Approve PO
  • [P1] Reject PO
  • [P1] Cancel PO
  • [P1] [rule] Validate PO
    • [P1] [rule] Visible only when one or more approval rules need to be validated (approved) by the role of current user
  • [P1] Place order from PO
    • [P1] Visible only if approved and can checkout (allow checkout permission)

Negotiable Quote Detail Page (/negotiable_quote/quote/view/quote_id/{id}/)

Completed features (click to expand items checklist)
  • [P2] Display purchase order number/link (for quotes converted into a purchase order)

Negotiable Quote Detail Print (/negotiable_quote/quote/print/quote_id/{id}/)

Completed features (click to expand items checklist)
  • [P3] Display purchase order number/link (for quotes converted into a purchase order)

Order Detail Page (/sales/order/view/order_id/{id})

Completed features (click to expand items checklist)
  • [P2] Display purchase order number/link (for purchase orders converted into an order)

Order Detail Print (/sales/order/view/order_id/{id})

Completed features (click to expand items checklist)
  • [P3] Display purchase order number/link (for purchase orders converted into an order)

Note: this is an additional feature not included in Luma

Approval Rules Listing Page (/purchaseorderrule/)

Completed features (click to expand items checklist)

Only visible with relevant permissions (can view or create/edit/delete approval rules)

  • [P1] [rule] Approval rules table
    • Rule Name, Status, Rule Type, Created by, Applies to, Approver, Actions columns
  • [P1] [rule] View approval rule link
    • [P2] [rule] Visible with relevant permissions only (view approval rules, but not create, edit, delete)
  • [P1] [rule] Edit approval rule link
    • [P2] [rule] Visible with relevant permissions only (create, edit, delete approval rules)
  • [P1] [rule] Delete approval rule link
    • [P2] [rule] Visible with relevant permissions only (create, edit, delete approval rules)
    • [P3] Modal confirmation
  • [P2] [rule] Pagination works
  • [P2] [rule] Limiter works
  • [P1] [rule] Add new approval rule button
    • [P2] [rule] Visible with relevant permissions only (create, edit, delete approval rules)
Delete Modal
  • [P3] Show confirmation message
  • [P3] Confirm/submit
  • [P3] Cancel/close
Unsupported features (click to expand items checklist)
  • [P3] Column sorting on tables

May be implemented in future, dependent on demand/usefulness

Approval Rules Create Page (/purchaseorderrule/create/)

Completed features (click to expand items checklist)
  • [P1] Accessible with relevant permissions only (create, edit, delete approval rules)
  • [P1] [rule] Show 'create new' page title
  • [P1] [rule] Status select
  • [P1] [rule] Name field
  • [P1] [rule] Description field
  • [P1] [rule] Applies to radio buttons
  • [P1] [rule] Show role checkboxes for 'specific roles' option
  • [P1] [rule] Rule type select
  • [P3] [rule] Rule type tooltip
  • [P1] [rule] Rule type totals conditions (based on selected rule type)
  • [P3] [rule] Rule type field requires approval search/filter results
  • [P1] [rule] Rule type field requires approval selection
  • [P2] [rule] Approval rule form validation (required fields)
  • [P1] [rule] Approval rule form submits
  • [P3] [rule] 'Back' link

Approval Rules Edit Page (/purchaseorderrule/edit/index/rule_id/{id}/)

Completed features (click to expand items checklist)
  • [P1] Accessible with relevant permissions only (create, edit, delete approval rules)
  • [P1] [rule] Show 'edit' page title
  • [P1] [rule] Status select (with existing data pre-populated)
  • [P1] [rule] Name field (with existing data pre-populated)
  • [P1] [rule] Description field (with existing data pre-populated)
  • [P1] [rule] Applies to radio buttons (with existing data pre-populated)
  • [P1] [rule] Show role checkboxes for 'specific roles' option (with existing data pre-populated)
  • [P1] [rule] Rule type select (with existing data pre-populated)
  • [P3] [rule] Rule type tooltip
  • [P1] [rule] Rule type totals conditions (based on selected rule type) (with existing data pre-populated)
  • [P3] [rule] Rule type field requires approval search/filter results
  • [P1] [rule] Rule type field requires approval selection (with existing data pre-populated)
  • [P2] [rule] Approval rule form validation (required fields)
  • [P1] [rule] Approval rule form submits
  • [P3] [rule] 'Back' link

Approval Rules View Page (/purchaseorderrule/view/index/rule_id/{id}/)

Completed features (click to expand items checklist)
  • [P2] Accessible with relevant permissions only (view approval rules only)
  • [P2] [rule] Approval rule info
    • Status, name, description, applies to, rule type, totals conditions, requires approval from
    • Replace form fields with static output (improvement over Luma)
  • [P3] [rule] 'Back' link

Contributors

@ryan-copeland

Voting

Use 👍 to cast your vote.Atque ducimus error pariatur quod quibusdam blanditiis neque quibusdam.

Edited by John Hughes