Skip to content

MEP 5 - Order Modeling (2)

  • Author: Rodda John
  • Status: Adopted
  • Adopted: 2024-03-22

Proposal

  • Kill all order level modifiers
    • Thus, all modifiers will belong to a specific line item; if an "order" modifier is desired, then it would be stored in the DB as belonging to each modifier.
    • Add a display_type to a modifier
      • merged: render this line item in the item modal
        • No separate total is rendered on the card
      • independent: render this line item on the order
        • This becomes a "line item" on each invoice / order summary
      • grouped: render this line item in a "misc fees" portion of the contract
  • Add tax_location and tax_code to each line item on the order
    • This will be used to calculate taxes ad hoc on the order.
      • Taxes will not be stored on the order.
  • Add line items to an invoice
    • Each invoice line item can be linked to an order line item
    • If it's not linked to an invoice line item, it's an arbitrary charge
      • This solves PO <> invoice linking
      • It also solves tax calculation on an order basis etc
  • Add source to invoice
    • moab | business
      • moab: generated by Moab, usually when a business is needing payment from a customer
      • business: genered by a business, usually to pay a purchase order
  • Add a DeliveryRequest model
    • A DeliveryRequest contains LoadRequests, which relate to specific line items
    • A DeliveryRequest contains all the information necessary to generate expense line items for delivery
    • For now, an order will have <= 1 DeliveryRequest
    • Store pickup / dropoff locations on the DeliveryRequest
      • And -not- on the load request idt (still deciding)
    • A rental will thus have two DeliveryRequest s
    • Add notes to job sites that persist across myultiple orders
  • An order should store the e.g. billing profile used (per line item) but then should also store the values themselves; this allows the FE to override everything.