Skip to main content

Retainer Invoices

The Retainer Invoices module allows widgets to access retainer invoice context related to advance payments. It exposes identifiers and conversion-related information. This module supports extensions for advance billing and invoice adjustments.

Methods

Get Retainerinvoice Details

Retrieves data related to the current context. This method allows your widget to fetch record details, field values, or metadata required for rendering or processing logic.

Commonly used for :
  • Fetch record information
  • Read field values
  • Access contextual module data
Supported Locations :
retainerinvoice.details.sidebarretainerinvoice.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('retainerinvoice').then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
retainerinvoice_idretainerinvoice.retainerinvoice_id
retainerinvoice_numberretainerinvoice.retainerinvoice_number
dateretainerinvoice.date
date_formattedretainerinvoice.date_formatted
statusretainerinvoice.status
status_formattedretainerinvoice.status_formatted
last_payment_dateretainerinvoice.last_payment_date
last_payment_date_formattedretainerinvoice.last_payment_date_formatted
reference_numberretainerinvoice.reference_number
customer_idretainerinvoice.customer_id
Show More Supported Input Keys
PropertyRequest
branch_idretainerinvoice.branch_id
roundoff_valueretainerinvoice.roundoff_value
roundoff_value_formattedretainerinvoice.roundoff_value_formatted
transaction_rounding_typeretainerinvoice.transaction_rounding_type
tax_treatmentretainerinvoice.tax_treatment
place_of_supplyretainerinvoice.place_of_supply
place_of_supply_formattedretainerinvoice.place_of_supply_formatted
customer_nameretainerinvoice.customer_name
contact_personsretainerinvoice.contact_persons
currency_idretainerinvoice.currency_id
currency_coderetainerinvoice.currency_code
currency_symbolretainerinvoice.currency_symbol
exchange_rateretainerinvoice.exchange_rate
is_viewed_by_clientretainerinvoice.is_viewed_by_client
unused_retainer_paymentsretainerinvoice.unused_retainer_payments
unused_retainer_payments_formattedretainerinvoice.unused_retainer_payments_formatted
client_viewed_timeretainerinvoice.client_viewed_time
client_viewed_time_formattedretainerinvoice.client_viewed_time_formatted
is_inclusive_taxretainerinvoice.is_inclusive_tax
tax_roundingretainerinvoice.tax_rounding
line_itemsretainerinvoice.line_items
sub_totalretainerinvoice.sub_total
sub_total_formattedretainerinvoice.sub_total_formatted
totalretainerinvoice.total
total_formattedretainerinvoice.total_formatted
taxesretainerinvoice.taxes
payment_maderetainerinvoice.payment_made
payment_made_formattedretainerinvoice.payment_made_formatted
payment_drawnretainerinvoice.payment_drawn
payment_drawn_formattedretainerinvoice.payment_drawn_formatted
balanceretainerinvoice.balance
balance_formattedretainerinvoice.balance_formatted
allow_partial_paymentsretainerinvoice.allow_partial_payments
price_precisionretainerinvoice.price_precision
payment_optionsretainerinvoice.payment_options
is_emailedretainerinvoice.is_emailed
contact_persons_associatedretainerinvoice.contact_persons_associated
paymentsretainerinvoice.payments
payment_refundsretainerinvoice.payment_refunds
documentsretainerinvoice.documents
commentsretainerinvoice.comments
billing_addressretainerinvoice.billing_address
shipping_addressretainerinvoice.shipping_address
notesretainerinvoice.notes
termsretainerinvoice.terms
custom_fieldsretainerinvoice.custom_fields
template_idretainerinvoice.template_id
template_nameretainerinvoice.template_name
template_typeretainerinvoice.template_type
template_type_formattedretainerinvoice.template_type_formatted
created_timeretainerinvoice.created_time
last_modified_timeretainerinvoice.last_modified_time
created_by_idretainerinvoice.created_by_id
last_modified_by_idretainerinvoice.last_modified_by_id
attachment_nameretainerinvoice.attachment_name
invoice_urlretainerinvoice.invoice_url
submitted_dateretainerinvoice.submitted_date
submitted_date_formattedretainerinvoice.submitted_date_formatted
submitted_byretainerinvoice.submitted_by
approvers_listretainerinvoice.approvers_list

Set Retainerinvoice Details

Updates or sets data within the current context. This method allows your widget to modify field values, update state, or pass data back to the host application.

Commonly used for :
  • Update field values
  • Set widget or module state
  • Pass data to the parent application
Supported Locations :
retainerinvoice.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('retainerinvoice.name', <value>).then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
retainerinvoice_idretainerinvoice.retainerinvoice_id
retainerinvoice_numberretainerinvoice.retainerinvoice_number
dateretainerinvoice.date
date_formattedretainerinvoice.date_formatted
statusretainerinvoice.status
status_formattedretainerinvoice.status_formatted
last_payment_dateretainerinvoice.last_payment_date
last_payment_date_formattedretainerinvoice.last_payment_date_formatted
reference_numberretainerinvoice.reference_number
customer_idretainerinvoice.customer_id
Show More Supported Input Keys
PropertyRequest
branch_idretainerinvoice.branch_id
roundoff_valueretainerinvoice.roundoff_value
roundoff_value_formattedretainerinvoice.roundoff_value_formatted
transaction_rounding_typeretainerinvoice.transaction_rounding_type
tax_treatmentretainerinvoice.tax_treatment
place_of_supplyretainerinvoice.place_of_supply
place_of_supply_formattedretainerinvoice.place_of_supply_formatted
customer_nameretainerinvoice.customer_name
contact_personsretainerinvoice.contact_persons
currency_idretainerinvoice.currency_id
currency_coderetainerinvoice.currency_code
currency_symbolretainerinvoice.currency_symbol
exchange_rateretainerinvoice.exchange_rate
is_viewed_by_clientretainerinvoice.is_viewed_by_client
unused_retainer_paymentsretainerinvoice.unused_retainer_payments
unused_retainer_payments_formattedretainerinvoice.unused_retainer_payments_formatted
client_viewed_timeretainerinvoice.client_viewed_time
client_viewed_time_formattedretainerinvoice.client_viewed_time_formatted
is_inclusive_taxretainerinvoice.is_inclusive_tax
tax_roundingretainerinvoice.tax_rounding
line_itemsretainerinvoice.line_items
sub_totalretainerinvoice.sub_total
sub_total_formattedretainerinvoice.sub_total_formatted
totalretainerinvoice.total
total_formattedretainerinvoice.total_formatted
taxesretainerinvoice.taxes
payment_maderetainerinvoice.payment_made
payment_made_formattedretainerinvoice.payment_made_formatted
payment_drawnretainerinvoice.payment_drawn
payment_drawn_formattedretainerinvoice.payment_drawn_formatted
balanceretainerinvoice.balance
balance_formattedretainerinvoice.balance_formatted
allow_partial_paymentsretainerinvoice.allow_partial_payments
price_precisionretainerinvoice.price_precision
payment_optionsretainerinvoice.payment_options
is_emailedretainerinvoice.is_emailed
contact_persons_associatedretainerinvoice.contact_persons_associated
paymentsretainerinvoice.payments
payment_refundsretainerinvoice.payment_refunds
documentsretainerinvoice.documents
commentsretainerinvoice.comments
billing_addressretainerinvoice.billing_address
shipping_addressretainerinvoice.shipping_address
notesretainerinvoice.notes
termsretainerinvoice.terms
custom_fieldsretainerinvoice.custom_fields
template_idretainerinvoice.template_id
template_nameretainerinvoice.template_name
template_typeretainerinvoice.template_type
template_type_formattedretainerinvoice.template_type_formatted
created_timeretainerinvoice.created_time
last_modified_timeretainerinvoice.last_modified_time
created_by_idretainerinvoice.created_by_id
last_modified_by_idretainerinvoice.last_modified_by_id
attachment_nameretainerinvoice.attachment_name
invoice_urlretainerinvoice.invoice_url
submitted_dateretainerinvoice.submitted_date
submitted_date_formattedretainerinvoice.submitted_date_formatted
submitted_byretainerinvoice.submitted_by
approvers_listretainerinvoice.approvers_list

Get Retainerinvoices List

Retrieves multiple data points or a collection of records related to the current context. This method is useful for fetching lists, related records, or bulk data required for your widget's functionality.

Commonly used for :
  • Fetch related records
  • Retrieve collections of data
  • Access lists or tables of information
Supported Locations :
retainerinvoice.list.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('retainerinvoices').then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}
Supported Input Keys :
PropertyRequest
retainerinvoice_idretainerinvoice.retainerinvoice_id
customer_nameretainerinvoice.customer_name
retainerinvoice_numberretainerinvoice.retainerinvoice_number
customer_idretainerinvoice.customer_id
statusretainerinvoice.status
status_formattedretainerinvoice.status_formatted
reference_numberretainerinvoice.reference_number
project_or_estimate_nameretainerinvoice.project_or_estimate_name
project_nameretainerinvoice.project_name
estimate_numberretainerinvoice.estimate_number
Show More Supported Input Keys
PropertyRequest
dateretainerinvoice.date
date_formattedretainerinvoice.date_formatted
currency_idretainerinvoice.currency_id
currency_coderetainerinvoice.currency_code
is_viewed_by_clientretainerinvoice.is_viewed_by_client
client_viewed_timeretainerinvoice.client_viewed_time
client_viewed_time_formattedretainerinvoice.client_viewed_time_formatted
totalretainerinvoice.total
total_formattedretainerinvoice.total_formatted
balanceretainerinvoice.balance
balance_formattedretainerinvoice.balance_formatted
created_timeretainerinvoice.created_time
last_modified_timeretainerinvoice.last_modified_time
last_payment_dateretainerinvoice.last_payment_date
last_payment_date_formattedretainerinvoice.last_payment_date_formatted
selectedretainerinvoice.selected

Set Retainerinvoice customfields

Specifically designed to update custom field values within the current context. This method allows your widget to target and modify custom fields without affecting standard fields, ensuring precise data management.

Commonly used for :
  • Update custom field values
  • Manage user-defined data points
  • Ensure targeted updates to specific fields
Supported Locations :
retainerinvoice.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('retainerinvoice.<custom_field_api_name>',<value>).then(function (data) {
     //response Handling
    }).catch(function (err) {
     //error Handling
    });
  });
}

Get Line Items

This method allows you to retrieve the line items associated with the current retainer invoice. It can be used to fetch details such as product information, quantity, rate, and total for each line item. This is particularly useful when you want to display or utilize the retainer invoice's line item details within your widget or extension.

Supported Locations :
retainerinvoice.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.get('retainerinvoice.line_items').then(function (res) {
      console.log('retainerinvoice line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching retainerinvoice line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
descriptiondescription
item_orderitem_order
product_typeproduct_type
raterate
tax_idtax_id
tax_exemption_idtax_exemption_id
tax_exemption_codetax_exemption_code
tax_treatment_codetax_treatment_code
gst_treatment_codegst_treatment_code

Set Line Items

This methods is to allowed for set a list of line items in the current retainer invoice. It can be used to set details such as product information, quantity, rate, and total for multiple line items. This is particularly useful when you want to update or set multiple line items details within your widget or extension.This methods is append the line items to the existing line items in the retainer invoice.

Supported Locations :
retainerinvoice.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    var lineItemMetaData =[{'rate':'1000','description':'Table','name':'Table'},{'rate':'1000','description':'Monitor','name':'Monitor'}]
    ZFAPPS.set('retainerinvoice.line_items',lineItemMetaData).then(function (res) {
      console.log('retainerinvoice line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching retainerinvoice line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
descriptiondescription
item_orderitem_order
product_typeproduct_type
raterate
tax_idtax_id
tax_exemption_idtax_exemption_id
tax_exemption_codetax_exemption_code
tax_treatment_codetax_treatment_code
gst_treatment_codegst_treatment_code

Set Single Line Items

This methods is to allowed for setting/updating a single line item in the current retainer invoice. It can be used to set details such as product information, quantity, rate, and total for a single line item. This is particularly useful when you want to update or set a single line item details within your widget or extension.

Supported Locations :
retainerinvoice.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    ZFAPPS.set('retainerinvoice.line_items[0]',{'rate':'1000'}).then(function (res) {
      console.log('retainerinvoice line item rate : ', res);
    }).catch(function (err) {
      console.log('Error while fetching retainerinvoice line item rate : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
descriptiondescription
item_orderitem_order
product_typeproduct_type
raterate
tax_idtax_id
tax_exemption_idtax_exemption_id
tax_exemption_codetax_exemption_code
tax_treatment_codetax_treatment_code
gst_treatment_codegst_treatment_code

Set Bulk Line Items

This methods is to allowed for replacing/updating all the existing line items in the current retainer invoice. It can be used to set details such as product information, quantity, rate, and total for multiple line items. This is particularly useful when you want to update or set multiple line items details within your widget or extension.

Supported Locations :
retainerinvoice.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    var lineItemMetaData =[{'rate':'1000','description':'Table','name':'Table'},{'rate':'1000','description':'Monitor','name':'Monitor'}]
    ZFAPPS.set('retainerinvoice.line_items.bulk_update',lineItemMetaData).then(function (res) {
      console.log('retainerinvoice line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching retainerinvoice line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
descriptiondescription
item_orderitem_order
product_typeproduct_type
raterate
tax_idtax_id
tax_exemption_idtax_exemption_id
tax_exemption_codetax_exemption_code
tax_treatment_codetax_treatment_code
gst_treatment_codegst_treatment_code

Set Line Items Customfields

This method is allowed for setting/updating custom fields for line items in the current retainer invoice. It can be used to set details such as product information, quantity, rate, total, and custom field values for multiple line items. This is particularly useful when you want to update or set multiple line items details along with their custom field values within your widget or extension.

Supported Locations :
retainerinvoice.creation.sidebar
Sample Code :
REQUEST DETAILS
window.onload = function () {
  ZFAPPS.extension.init().then(function(App) {
    var lineItemMetaData =[{'rate':'1000','description':'Table','name':'Table','item_custom_fields':[{'api_name':'<line_item_custom_field_name>', 'value':'<value>'}]}]
    ZFAPPS.set('retainerinvoice.line_items',lineItemMetaData).then(function (res) {
      console.log('retainerinvoice line items : ', res);
    }).catch(function (err) {
      console.log('Error while fetching retainerinvoice line items : ', err);
    });
  });
}
Supported Input Keys :
PropertyRequest
line_item_idline_item_id
descriptiondescription
item_orderitem_order
product_typeproduct_type
raterate
tax_idtax_id
tax_exemption_idtax_exemption_id
tax_exemption_codetax_exemption_code
tax_treatment_codetax_treatment_code
gst_treatment_codegst_treatment_code