iVendNextDevelopers Request a sandbox

Purchase Order

An order the retailer sends a supplier.

Area: Purchase and transfer documents · Why it is here: sample S34; retail core · Fields: 100 · Submitted (booked) records: send docstatus: 1 to book it as you create it, or submit a draft with submit.

Read and write it

Every call runs as your app's own user, with its key in one header, at the retailer's own address. The user reads and writes only what its role allows: your app's user, and the rights the retailer gives it.

Read a list (only name unless you ask for fields):

curl -s "https://⟨site⟩/api/resource/Purchase%20Order?fields=%5B%22*%22%5D&limit_page_length=20" \
  -H "Authorization: token ⟨api key⟩:⟨api secret⟩"

Read one, with its tables:

curl -s "https://⟨site⟩/api/resource/Purchase%20Order/⟨name⟩" -H "Authorization: token ⟨api key⟩:⟨api secret⟩"

Create one (the required fields first), if your app's role may:

curl -s -X POST "https://⟨site⟩/api/resource/Purchase%20Order" -H "Authorization: token ⟨api key⟩:⟨api secret⟩" \
  -H "Content-Type: application/json" -d '{"title": …, "naming_series": …, "supplier": …, "transaction_date": …, "company": …, "currency": …}'

Change one with PUT /api/resource/Purchase%20Order/⟨name⟩ and the fields you change; a table sent there replaces its rows, so send its existing rows too. All the record calls and their answers: the API reference.

Samples that use it

s22_customer_loyalty · s34_po_check

Fields

Read from the product at POS 2.1.0.667 (till app 60147699c): its own fields, the fields iVendNext adds to it, and iVendNext's changes to any of them. Read-only fields are set by iVendNext; a hidden one is not on the form but can be read. Every record also has name (its id, in the address), owner, creation, modified, modified_by and docstatus (0 a draft, 1 submitted, 2 cancelled), all read-only.

Field Field name Type Required Read-only Hidden Links to
Title title Data yes yes
Series naming_series Select yes one of: PUR-ORD-.YYYY.-
Supplier supplier Link yes Supplier
Supplier Name supplier_name Data yes
Order Confirmation No order_confirmation_no Data
Order Confirmation Date order_confirmation_date Date
Date transaction_date Date yes
Required By schedule_date Date
Company company Link yes Company
Apply Tax Withholding Amount apply_tds Check
Tax Withholding Category tax_withholding_category Link Tax Withholding Category
Is Subcontracted is_subcontracted Check
Supplier Warehouse supplier_warehouse Link Warehouse
Amended From amended_from Link yes Purchase Order
Cost Center cost_center Link Cost Center
Project project Link Project
Currency currency Link yes Currency
Exchange Rate conversion_rate Float yes
Price List buying_price_list Link Price List
Price List Currency price_list_currency Link yes Currency
Price List Exchange Rate plc_conversion_rate Float
Ignore Pricing Rule ignore_pricing_rule Check
Scan Barcode scan_barcode Data
Set From Warehouse set_from_warehouse Link Warehouse
Set Target Warehouse set_warehouse Link Warehouse
Items items Table yes Purchase Order Item
Total Quantity total_qty Float yes
Total Net Weight total_net_weight Float yes
Total (Company Currency) base_total Currency yes
Net Total (Company Currency) base_net_total Currency yes
Total total Currency yes
Net Total net_total Currency yes
Tax Withholding Net Total tax_withholding_net_total Currency yes yes
Base Tax Withholding Net Total base_tax_withholding_net_total Currency yes yes
Purchase Order Pricing Rule pricing_rules Table yes Pricing Rule Detail
Set Reserve Warehouse set_reserve_warehouse Link Warehouse
Supplied Items supplied_items Table yes Purchase Order Item Supplied
Tax Category tax_category Link Tax Category
Purchase Taxes and Charges Template taxes_and_charges Link Purchase Taxes and Charges Template
Shipping Rule shipping_rule Link Shipping Rule
Incoterm incoterm Link Incoterm
Named Place named_place Data
Purchase Taxes and Charges taxes Table Purchase Taxes and Charges
Taxes and Charges Added (Company Currency) base_taxes_and_charges_added Currency yes
Taxes and Charges Deducted (Company Currency) base_taxes_and_charges_deducted Currency yes
Total Taxes and Charges (Company Currency) base_total_taxes_and_charges Currency yes
Taxes and Charges Added taxes_and_charges_added Currency yes
Taxes and Charges Deducted taxes_and_charges_deducted Currency yes
Total Taxes and Charges total_taxes_and_charges Currency yes
Grand Total (Company Currency) base_grand_total Currency yes
Rounding Adjustment (Company Currency) base_rounding_adjustment Currency yes
In Words (Company Currency) base_in_words Data yes
Rounded Total (Company Currency) base_rounded_total Currency yes
Grand Total grand_total Currency yes
Rounding Adjustment rounding_adjustment Currency yes
Rounded Total rounded_total Currency yes
Disable Rounded Total disable_rounded_total Check
In Words in_words Data yes
Advance Paid advance_paid Currency yes
Apply Additional Discount On apply_discount_on Select one of: Grand Total, Net Total
Additional Discount Amount (Company Currency) base_discount_amount Currency yes
Additional Discount Percentage additional_discount_percentage Float
Additional Discount Amount discount_amount Currency
Taxes and Charges Calculation other_charges_calculation Text Editor yes
Supplier Address supplier_address Link Address
Supplier Address Details address_display Small Text yes
Supplier Contact contact_person Link Contact
Contact Name contact_display Small Text yes
Contact Mobile No contact_mobile Small Text yes
Contact Email contact_email Small Text yes
Shipping Address shipping_address Link Address
Shipping Address Details shipping_address_display Small Text yes
Company Billing Address billing_address Link Address
Billing Address Details billing_address_display Small Text yes
Customer customer Link yes Customer
Customer Name customer_name Data yes
Customer Contact customer_contact_person Link Contact
Customer Contact customer_contact_display Small Text
Customer Mobile No customer_contact_mobile Small Text yes
Customer Contact Email customer_contact_email Code yes
Payment Terms Template payment_terms_template Link Payment Terms Template
Payment Schedule payment_schedule Table Payment Schedule
Terms tc_name Link Terms and Conditions
Terms and Conditions terms Text Editor
Status status Select yes yes one of: Draft, On Hold, To Receive and Bill, To Bill, To Receive, Completed, Cancelled, Closed, Delivered
% Billed per_billed Percent yes
% Received per_received Percent yes
Letter Head letter_head Link Letter Head
Group same items group_same_items Check
Print Heading select_print_heading Link Print Heading
Print Language language Data
From Date from_date Date
To Date to_date Date
Auto Repeat auto_repeat Link yes Auto Repeat
Is Internal Supplier is_internal_supplier Check yes
Represents Company represents_company Link yes Company
Supplier Quotation ref_sq Link yes Supplier Quotation
Party Account Currency party_account_currency Link yes yes Currency
Inter Company Order Reference inter_company_order_reference Link yes Sales Order
Is Old Subcontracting Flow is_old_subcontracting_flow Check yes yes

Table: Payment Schedule

The rows of payment_schedule. Each row also has idx (its place), parent, parentfield and parenttype.

Field Field name Type Required Read-only Hidden Links to
Payment Term payment_term Link Payment Term
Description description Small Text
Due Date due_date Date yes
Mode of Payment mode_of_payment Link Mode of Payment
Invoice Portion invoice_portion Percent
Discount Type discount_type Select one of: Percentage, Amount
Discount Date discount_date Date
Discount discount Float
Payment Amount payment_amount Currency yes
Outstanding outstanding Currency yes
Paid Amount paid_amount Currency
Discounted Amount discounted_amount Currency yes
Payment Amount (Company Currency) base_payment_amount Currency

Table: Pricing Rule Detail

The rows of pricing_rules. Each row also has idx (its place), parent, parentfield and parenttype.

Field Field name Type Required Read-only Hidden Links to
Pricing Rule pricing_rule Link yes Pricing Rule
Item Code item_code Data yes
Margin Type margin_type Data yes yes
Rate or Discount rate_or_discount Data yes yes
Child Docname child_docname Data yes yes
Rule Applied rule_applied Check yes

Table: Purchase Order Item

The rows of items. Each row also has idx (its place), parent, parentfield and parenttype.

Field Field name Type Required Read-only Hidden Links to
Finished Good fg_item Link Item
Finished Good Qty fg_item_qty Float
Item Code item_code Link yes Item
Supplier Part Number supplier_part_no Data yes yes
Item Name item_name Data yes
Brand brand Link yes yes Brand
Product Bundle product_bundle Link yes Product Bundle
Required By schedule_date Date yes
Expected Delivery Date expected_delivery_date Date
Item Group item_group Link yes yes Item Group
Description description Text Editor
Image image Attach yes
Quantity qty Float yes
Stock UOM stock_uom Link yes yes UOM
Subcontracted Quantity sco_qty Float yes
UOM uom Link yes UOM
UOM Conversion Factor conversion_factor Float yes
Qty in Stock UOM stock_qty Float yes
Price List Rate price_list_rate Currency
Last Purchase Rate last_purchase_rate Currency yes
Price List Rate (Company Currency) base_price_list_rate Currency yes
Margin Type margin_type Select one of: Percentage, Amount
Margin Rate or Amount margin_rate_or_amount Float
Rate With Margin rate_with_margin Currency yes
Discount on Price List Rate (%) discount_percentage Percent
Discount Amount discount_amount Currency
Rate With Margin (Company Currency) base_rate_with_margin Currency yes
Rate rate Currency
Amount amount Currency yes
Item Tax Template item_tax_template Link Item Tax Template
Rate (Company Currency) base_rate Currency yes yes
Amount (Company Currency) base_amount Currency yes yes
Pricing Rules pricing_rules Small Text yes yes
Rate of Stock UOM stock_uom_rate Currency yes
Is Free Item is_free_item Check yes
Apply TDS apply_tds Check
Net Rate net_rate Currency yes
Net Amount net_amount Currency yes
Net Rate (Company Currency) base_net_rate Currency yes
Net Amount (Company Currency) base_net_amount Currency yes
From Warehouse from_warehouse Link Warehouse
Target Warehouse warehouse Link Warehouse
Available Qty at Target Warehouse actual_qty Float yes
Available Qty at Company company_total_stock Float yes
Material Request material_request Link yes Material Request
Material Request Item material_request_item Data yes yes
Sales Order sales_order Link Sales Order
Sales Order Item sales_order_item Data yes yes
Sales Order Packed Item sales_order_packed_item Data
Supplier Quotation supplier_quotation Link yes Supplier Quotation
Supplier Quotation Item supplier_quotation_item Link yes yes Supplier Quotation Item
To be Delivered to Customer delivered_by_supplier Check yes
Against Blanket Order against_blanket_order Check
Blanket Order blanket_order Link Blanket Order
Blanket Order Rate blanket_order_rate Currency yes
Received Qty received_qty Float yes
Returned Qty returned_qty Float yes
Billed Amount billed_amt Currency yes
Expense Account expense_account Link Account
WIP Composite Asset wip_composite_asset Link Asset
Manufacturer manufacturer Link Manufacturer
Manufacturer Part Number manufacturer_part_no Data
BOM bom Link yes BOM
Include Exploded Items include_exploded_items Check
Weight Per Unit weight_per_unit Float yes
Total Weight total_weight Float yes
Weight UOM weight_uom Link yes UOM
Project project Link Project
Cost Center cost_center Link Cost Center
Is Fixed Asset is_fixed_asset Check yes
Item Tax Rate item_tax_rate Code yes yes
Production Plan production_plan Link yes Production Plan
Production Plan Item production_plan_item Data yes yes
Production Plan Sub Assembly Item production_plan_sub_assembly_item Data yes yes
Page Break page_break Check
Total Tax (added by iVendNext) custom_total_tax Float yes
Tax Total Breakup (added by iVendNext) custom_tax_breakup Text yes

Table: Purchase Order Item Supplied

The rows of supplied_items. Each row also has idx (its place), parent, parentfield and parenttype.

Field Field name Type Required Read-only Hidden Links to
Item Code main_item_code Link yes Item
Raw Material Item Code rm_item_code Link yes Item
Stock Uom stock_uom Link yes UOM
Reserve Warehouse reserve_warehouse Link Warehouse
Conversion Factor conversion_factor Float yes yes
BOM Detail No bom_detail_no Data yes
Reference Name reference_name Data yes
Rate rate Currency
Amount amount Currency yes
Required Qty required_qty Float yes
Supplied Qty supplied_qty Float yes
Consumed Qty consumed_qty Float yes
Returned Qty returned_qty Float yes
Total Supplied Qty total_supplied_qty Float yes yes

Table: Purchase Taxes and Charges

The rows of taxes. Each row also has idx (its place), parent, parentfield and parenttype.

Field Field name Type Required Read-only Hidden Links to
Consider Tax or Charge for category Select yes one of: Valuation and Total, Valuation, Total
Add or Deduct add_deduct_tax Select yes one of: Add, Deduct
Type charge_type Select yes one of: Actual, On Net Total, On Previous Row Amount, On Previous Row Total, On Item Quantity
Reference Row # row_id Data
Is this Tax included in Basic Rate? included_in_print_rate Check
Considered In Paid Amount included_in_paid_amount Check
Account Head account_head Link yes Account
Description description Small Text yes
Is Tax Withholding Account is_tax_withholding_account Check yes
Tax Rate rate Float
Cost Center cost_center Link Cost Center
Account Currency account_currency Link yes Currency
Amount tax_amount Currency
Tax Amount After Discount Amount tax_amount_after_discount_amount Currency yes
Total total Currency yes
Amount (Company Currency) base_tax_amount Currency yes
Total (Company Currency) base_total Currency yes
Tax Amount After Discount Amount base_tax_amount_after_discount_amount Currency yes
Item Wise Tax Detail item_wise_tax_detail Code yes yes

All record types · What you can use

This record type in the kit