:mod:`rattail.ext.purchasing` Module ------------------------------------ This extension adds a more or less generic purchasing system to Rattail. Core Mappings ============= In addition to providing extra classes (listed below), the ``purchasing`` extension also adds the following attribute to the core :class:`rattail.Product` class: .. attribute:: sources A list of :class:`rattail.ProductSource` instances for the product. Classes ======= .. autoclass:: rattail.ProductSource .. attribute:: product A reference to the :class:`rattail.Product` provided by this source. .. attribute:: vendor A reference to the :class:`rattail.Vendor` from which this source is available. .. attribute:: sku A vendor-specific SKU to be used when ordering product via this source. .. attribute:: quantity Quantity of the product which is represented by this source. .. attribute:: suggested_retail The suggested retail price for the product, specific to this source. .. attribute:: unit_cost The per-unit cost of the product when purchased via this source. .. attribute:: cost_recorded Date and time when this source's cost was last recorded. (For use in catalog data import tracking.) .. attribute:: cost_expires Date and time when this source's cost will expire, if known. .. autoclass:: rattail.PurchaseOrder .. attribute:: id An integer field which may contain a human-friendly ID for the purchase order. .. attribute:: vendor A reference to the :class:`rattail.Vendor` to whom this purchase order is submitted. .. attribute:: buyer A reference to the :class:`rattail.Employee` who is assembling the purchase order. .. attribute:: confirmer A reference to the :class:`rattail.Employee` who is confirming the purchase order. .. attribute:: ordered Date and time when the order was submitted to the vendor. .. attribute:: expected Date and time when the order is expected to arrive, if known. .. attribute:: received Date and time when the order is received. .. attribute:: receiver A reference to the :class:`rattail.Employee` who receives the purchase order. .. attribute:: details A list of :class:`rattail.PurchaseOrderProduct` instances belonging to the purchase order. .. autoclass:: rattail.PurchaseOrderProduct .. attribute:: product A reference to the :class:`rattail.Product` being ordered. .. attribute:: product_source A reference to the specific :class:`rattail.ProductSource` being ordered. .. attribute:: quantity_ordered Quantity of the product being ordered. This value should be interpreted relative to :attr:`PurchaseOrderProduct.product_source`. .. attribute:: quantity_received Quantity of the product which is received, for comparison to :attr:`PurchaseOrderProduct.quantity_ordered`. .. autoclass:: rattail.Vendor .. attribute:: name The name of the vendor.