Purchase order items
accessories
accessories Returns opportunity item objects for a purchase order item. Works in the same way that the children object does.
Input
{% for item in item.accessories %}
{{ item.name }}
{% endfor %}Output
ETC Source Fourcharge_total_including_children
charge_total_including_children Returns a purchase order item charge total, including the charge total of any accessory items.
Generally used where you’d like to roll up the price of accessories into their parent item, like when working with packages or kits.
Input
{{ item.charge_total_including_children }}Output
accessory_is_default?
Returns true if a purchase order is an accessory and the accessory’s inclusion type is “Default”.
Input
Output
accessory_is_mandatory?
accessory_is_mandatory?Returns true if a purchase order item is an accessory and the accessory’s inclusion type is “Mandatory”.
Input
Output
accessory_is_optional?
accessory_is_optional?Returns true if a purchase order is an accessory and the accessory’s inclusion type is “Optional”.
Input
Output
accessory_mode_is_accessory?
accessory_mode_is_accessory?Returns true if a purchase order is an accessory and the accessory’s mode is “Accessory”.
Input
Output
accessory_mode_is_component?
accessory_mode_is_component?Returns true if a purchase order is an accessory and the accessory’s mode is “Component”.
Input
Output
accessory_mode_is_safety?
accessory_mode_is_safety?Returns true if a purchase order is an accessory and the accessory’s mode is “Safety”.
Input
Output
accessory_mode_name
accessory_mode_nameReturns the accessory’s mode name where a purchase order is an accessory; blank otherwise.
accessory
component
safety item
Input
Output
charge_excluding_tax_total
charge_excluding_tax_totalReturns a purchase order item charge total excluding tax.
Input
Output
charge_including_tax_total
charge_including_tax_totalReturns a purchase order item charge total including tax.
Input
Output
charge_total_including_children
charge_total_including_childrenReturns a purchase order charge total, including the charge total of any accessory items.
Generally used where you’d like to roll up the price of accessories into their parent item, like when working with packages or kits.
Input
Output
charge_total
charge_totalReturns a purchase order item charge total.
This may be including or excluding tax depending on the value of the “Catalog Prices” setting in System Preferences.
Input
Output
chargeable_days
chargeable_daysReturns the number of chargeable days for a purchase order item.
For service items, the value of the “Rate Quantity” field is returned. The rate type may be hour or distance.
For sale items, returns 0.
Input
Output
charging_periods
charging_periodsReturns charging period objects for a purchase order item.
Input
Output
Charging periodchildren
Returns purchase order item objects for a purchase order item.
When an item is an item, this will return accessories.
When the item is a group, this will return items within that group.
The children object only returns objects that are the next level deep in the tree. For example, accessories on accessories aren't returned.
Input
Output
depth
depthReturns the depth of a purchase order item in the tree. An item’s depth is determined by how it is nested under items.

Input
Output
depth_padding
depth_paddingReturns the depth padding for a purchase order item. Generally used to apply an inline style to a table cell in HTML so that items appear nested.
Increments in multiples of 16.
Input
Output
description
descriptionReturns a purchase order item’s description.
Input
Output
discount_amount
discount_amountReturns the amount of discount applied to a purchase order item.
Returns 0 for groups and subtotals.
Use discount_total for groups.
Input
Output
discount_percent
discount_percentReturns the percentage discount applied to a purchase order item.
Returns 0 for groups and subtotals.
Input
Output
discounted_price
discounted_priceReturns a purchase order item’s price after discount.
Input
Output
ends_at
ends_at Returns the charging end date for a purchase order item. Generally used for service items.
For service items, returns the end date and time for the opportunity item.
For rental and sale items, returns the end date and time for the opportunity.
For groups, returns blank.
For subtotals, returns the date and time that the document was generated in UTC.
Input
Output
has_child_items?
has_child_items? Returns true if a purchase order item has children items; false otherwise. Generally used for detecting if an opportunity item has accessories.
Input
Output
has_discount?
has_discount?Returns true if a purchase order item has a discount applied; false otherwise.
Where a purchase order item has a negative discount applied, has_discount will return false. For example, -50% would increment the charge total by 50% so has_discount will return false.
Input
Output
id
Returns a purchase order item ID.
Input
Output
image_url
Returns a URL pointing at the product or service's picture. The full size image is returned.
Input
Output
is_accessory?
is_accessory?Returns true if a purchase order item is an accessory; false otherwise.
Input
Output
is_group?
is_group?Returns true if a purchase order item is a group; false otherwise.
Input
Output
is_item?
is_item?Returns true if a purchase order item is an item; false otherwise.
Input
Output
is_principal?
is_principal?Returns true if a purchase order item has accessory items nested underneath it; false otherwise.
Input
Output
is_product?
is_product?Returns true if a purchase order item is linked to a product record; false otherwise.
Input
Output
is_service_item?
is_service_item?Returns true if a purchase order item is linked to a service record; false otherwise.
Input
Output
is_subtotal?
is_subtotal?Returns true if a purchase order item is a group item's subtotal; false otherwise.
Subtotal rows are informational only and many purchase order item objects will print "Liquid error: internal" rather than return blank or false.
Input
Output
is_text_item?
is_text_item?Returns true if a purchase order item is a text item; false otherwise.
Input
Output
name
nameReturns a purchase order item's name.
Input
Output
opportunity
opportunity Returns opportunity objects for the opportunity that a purchase order item is related to.
Input
Output
opportunity_cost
opportunity_cost Returns opportunity cost objects for the opportunity cost that a purchase order item is related to.
Input
Output
price
price Returns a purchase order item's price without discount.
Input
Output
price_unit
price_unitReturns a purchase order item's price unit name.
The price unit name output depends on the rental charge used. Some common examples:
Daily
Weekly
Per period
Each
Input
Output
product
product Where related to a product, returns product objects for a purchase order item.
Input
Output
product_group_name
product_group_name Where related to a product, returns the related product's product group name for a purchase order item.
Input
Output
purchase_order
purchase_order Returns purchase order objects for the purchase order that a purchase order item is related to.
Input
Output
quantity
quantityReturns the quantity of a purchase order item.
Input
Output
rate_definition_name
rate_definition_nameReturns the rate definition name for a purchase order item where the item is a sub-rental.
Returns blank for sales, services, and group items.
Input
Output
service
service Where related to a service, returns service objects for a purchase order item.
Input
Output
service_unit_name
service_unit_nameReturns the service unit name for a purchase order item.
Day
Days
Hour
Hours
miles
km
Input
Output
starts_at
starts_atReturns the charging start date for a purchase order item. Generally used for service items.
For service items, returns the start date and time for the opportunity item.
For rental and sale items, returns the start date and time for the opportunity.
For groups, returns blank.
For subtotals, returns the date and time that the document was generated in UTC.
Input
Output
subtotal
subtotalReturns the subtotal amount for a purchase order group.
Subtotal rows are informational only. This will only return a value for subtotal rows. This will match the charge_total of the corresponding purchase order item group.
Input
Output
subtotal_name
subtotal_nameReturns the subtotal name for a purchase order item group.
Subtotal rows are informational only. This will only return a value for subtotal rows. This will match the name of the corresponding purchase order group.
Input
Output
supplier_reference
supplier_referenceReturns the supplier reference for a purchase order item's related opportunity cost.
Input
Output
tax_class_name
tax_class_name Returns the tax class name against a purchase order item.
Input
Output
tax_total
tax_totalReturns the tax total for a purchase order item. Works for items and groups.
Input
Output
thumbnail_url
thumbnail_urlReturns a URL pointing at the product or service's picture. A thumbnail size image is returned.
Input
Output
transaction_type_name
transaction_type_nameReturns the transaction type name for a purchase order item.
Input
Output
unit_charge
unit_chargeReturns the unit charge for a purchase order.
The unit charge is the price for one unit of a purchase order.
Input
Output
unit_charge_amount
unit_charge_amountReturns the unit charge for a purchase order excluding discount.
The unit charge is the price for one unit of a purchase order.
Input
Output
weight_total
weight_totalReturns the weight total for a purchase order item.
This is calculated by multiplying the quantity by the product weight.
Input
Output
weight_total_including_children
weight_total_including_childrenReturns the weight total for a purchase order item.
This is calculated by multiplying the quantity by the product weight.
Input
Output
Last updated
Was this helpful?