Payments Made
The Payments Made module provides access to contextual information about the current vendor payment when a widget is rendered within supported payment-related pages. Widgets can retrieve payment identifiers, linked bill references, and associated vendor details for use in validations, conditional logic, and UI extensions.
- Methods
- Events
Methods
Get Vendorpayment 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.
- Fetch record information
- Read field values
- Access contextual module data
window.onload = function () {
ZFAPPS.extension.init().then(function(App) {
ZFAPPS.get('vendorpayment').then(function (data) {
//response Handling
}).catch(function (err) {
//error Handling
});
});
}
| Property | Request |
|---|---|
| payment_id | vendorpayment.payment_id |
| vendor_id | vendorpayment.vendor_id |
| vendor_name | vendorpayment.vendor_name |
| status | vendorpayment.status |
| status_formatted | vendorpayment.status_formatted |
| is_online_payment | vendorpayment.is_online_payment |
| transfer_type | vendorpayment.transfer_type |
| branch_id | vendorpayment.branch_id |
| branch_name | vendorpayment.branch_name |
| location_id | vendorpayment.location_id |
Show More Supported Input Keys
| Property | Request |
|---|---|
| location_name | vendorpayment.location_name |
| payment_mode | vendorpayment.payment_mode |
| payment_number | vendorpayment.payment_number |
| payment_number_prefix | vendorpayment.payment_number_prefix |
| payment_number_suffix | vendorpayment.payment_number_suffix |
| purpose_code | vendorpayment.purpose_code |
| custom_fields | vendorpayment.custom_fields |
| custom_field_hash | vendorpayment.custom_field_hash |
| description | vendorpayment.description |
| documents | vendorpayment.documents |
| date | vendorpayment.date |
| date_formatted | vendorpayment.date_formatted |
| reference_number | vendorpayment.reference_number |
| exchange_rate | vendorpayment.exchange_rate |
| exchange_rate_formatted | vendorpayment.exchange_rate_formatted |
| tds_tax_id | vendorpayment.tds_tax_id |
| indirect_tds_tax_id | vendorpayment.indirect_tds_tax_id |
| indirect_tds_tax_amount | vendorpayment.indirect_tds_tax_amount |
| indirect_tds_tax_amount_formatted | vendorpayment.indirect_tds_tax_amount_formatted |
| indirect_tcs_tax_id | vendorpayment.indirect_tcs_tax_id |
| indirect_tcs_tax_amount | vendorpayment.indirect_tcs_tax_amount |
| indirect_tcs_tax_amount_formatted | vendorpayment.indirect_tcs_tax_amount_formatted |
| indirect_tds_tax_details | vendorpayment.indirect_tds_tax_details |
| indirect_tcs_tax_details | vendorpayment.indirect_tcs_tax_details |
| tds_calculation_type | vendorpayment.tds_calculation_type |
| is_tds_amount_in_percent | vendorpayment.is_tds_amount_in_percent |
| tds_override_preference | vendorpayment.tds_override_preference |
| tds_summary | vendorpayment.tds_summary |
| tax_account_id | vendorpayment.tax_account_id |
| tax_account_name | vendorpayment.tax_account_name |
| tax_amount_withheld | vendorpayment.tax_amount_withheld |
| tax_amount_withheld_formatted | vendorpayment.tax_amount_withheld_formatted |
| amount | vendorpayment.amount |
| amount_formatted | vendorpayment.amount_formatted |
| total_payment_amount | vendorpayment.total_payment_amount |
| total_payment_amount_formatted | vendorpayment.total_payment_amount_formatted |
| balance | vendorpayment.balance |
| balance_formatted | vendorpayment.balance_formatted |
| currency_id | vendorpayment.currency_id |
| currency_code | vendorpayment.currency_code |
| currency_symbol | vendorpayment.currency_symbol |
| created_time | vendorpayment.created_time |
| last_modified_time | vendorpayment.last_modified_time |
| created_by_id | vendorpayment.created_by_id |
| created_by_name | vendorpayment.created_by_name |
| credit_account_id | vendorpayment.credit_account_id |
| paid_through_account_id | vendorpayment.paid_through_account_id |
| paid_through_account_name | vendorpayment.paid_through_account_name |
| paid_through_account_type | vendorpayment.paid_through_account_type |
| paid_through_account_type_formatted | vendorpayment.paid_through_account_type_formatted |
| is_paid_via_print_check | vendorpayment.is_paid_via_print_check |
| offset_account_id | vendorpayment.offset_account_id |
| offset_account_name | vendorpayment.offset_account_name |
| is_pre_gst | vendorpayment.is_pre_gst |
| source_of_supply | vendorpayment.source_of_supply |
| source_of_supply_formatted | vendorpayment.source_of_supply_formatted |
| destination_of_supply | vendorpayment.destination_of_supply |
| destination_of_supply_formatted | vendorpayment.destination_of_supply_formatted |
| gst_treatment | vendorpayment.gst_treatment |
| tax_treatment | vendorpayment.tax_treatment |
| gst_return_details | vendorpayment.gst_return_details |
| gst_no | vendorpayment.gst_no |
| reverse_charge_tax_id | vendorpayment.reverse_charge_tax_id |
| is_advance_payment | vendorpayment.is_advance_payment |
| product_description | vendorpayment.product_description |
| is_reverse_charge_applied | vendorpayment.is_reverse_charge_applied |
| is_ach_payment | vendorpayment.is_ach_payment |
| ach_payment_status | vendorpayment.ach_payment_status |
| ach_payment_status_formatted | vendorpayment.ach_payment_status_formatted |
| check_details | vendorpayment.check_details |
| billing_address | vendorpayment.billing_address |
| bills | vendorpayment.bills |
| vendorpayment_refunds | vendorpayment.vendorpayment_refunds |
| comments | vendorpayment.comments |
| imported_transactions | vendorpayment.imported_transactions |
| approvers_list | vendorpayment.approvers_list |
| submitted_date | vendorpayment.submitted_date |
| submitted_date_formatted | vendorpayment.submitted_date_formatted |
| submitted_by | vendorpayment.submitted_by |
| submitted_by_name | vendorpayment.submitted_by_name |
| submitted_by_email | vendorpayment.submitted_by_email |
| submitted_by_photo_url | vendorpayment.submitted_by_photo_url |
| submitter_id | vendorpayment.submitter_id |
| approver_id | vendorpayment.approver_id |
Set Vendorpayment 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.
- Update field values
- Set widget or module state
- Pass data to the parent application
window.onload = function () {
ZFAPPS.extension.init().then(function(App) {
ZFAPPS.set('vendorpayment.name', <value>).then(function (data) {
//response Handling
}).catch(function (err) {
//error Handling
});
});
}
| Property | Request |
|---|---|
| payment_id | vendorpayment.payment_id |
| vendor_id | vendorpayment.vendor_id |
| vendor_name | vendorpayment.vendor_name |
| status | vendorpayment.status |
| status_formatted | vendorpayment.status_formatted |
| is_online_payment | vendorpayment.is_online_payment |
| transfer_type | vendorpayment.transfer_type |
| branch_id | vendorpayment.branch_id |
| branch_name | vendorpayment.branch_name |
| location_id | vendorpayment.location_id |
Show More Supported Input Keys
| Property | Request |
|---|---|
| location_name | vendorpayment.location_name |
| payment_mode | vendorpayment.payment_mode |
| payment_number | vendorpayment.payment_number |
| payment_number_prefix | vendorpayment.payment_number_prefix |
| payment_number_suffix | vendorpayment.payment_number_suffix |
| purpose_code | vendorpayment.purpose_code |
| custom_fields | vendorpayment.custom_fields |
| custom_field_hash | vendorpayment.custom_field_hash |
| description | vendorpayment.description |
| documents | vendorpayment.documents |
| date | vendorpayment.date |
| date_formatted | vendorpayment.date_formatted |
| reference_number | vendorpayment.reference_number |
| exchange_rate | vendorpayment.exchange_rate |
| exchange_rate_formatted | vendorpayment.exchange_rate_formatted |
| tds_tax_id | vendorpayment.tds_tax_id |
| indirect_tds_tax_id | vendorpayment.indirect_tds_tax_id |
| indirect_tds_tax_amount | vendorpayment.indirect_tds_tax_amount |
| indirect_tds_tax_amount_formatted | vendorpayment.indirect_tds_tax_amount_formatted |
| indirect_tcs_tax_id | vendorpayment.indirect_tcs_tax_id |
| indirect_tcs_tax_amount | vendorpayment.indirect_tcs_tax_amount |
| indirect_tcs_tax_amount_formatted | vendorpayment.indirect_tcs_tax_amount_formatted |
| indirect_tds_tax_details | vendorpayment.indirect_tds_tax_details |
| indirect_tcs_tax_details | vendorpayment.indirect_tcs_tax_details |
| tds_calculation_type | vendorpayment.tds_calculation_type |
| is_tds_amount_in_percent | vendorpayment.is_tds_amount_in_percent |
| tds_override_preference | vendorpayment.tds_override_preference |
| tds_summary | vendorpayment.tds_summary |
| tax_account_id | vendorpayment.tax_account_id |
| tax_account_name | vendorpayment.tax_account_name |
| tax_amount_withheld | vendorpayment.tax_amount_withheld |
| tax_amount_withheld_formatted | vendorpayment.tax_amount_withheld_formatted |
| amount | vendorpayment.amount |
| amount_formatted | vendorpayment.amount_formatted |
| total_payment_amount | vendorpayment.total_payment_amount |
| total_payment_amount_formatted | vendorpayment.total_payment_amount_formatted |
| balance | vendorpayment.balance |
| balance_formatted | vendorpayment.balance_formatted |
| currency_id | vendorpayment.currency_id |
| currency_code | vendorpayment.currency_code |
| currency_symbol | vendorpayment.currency_symbol |
| created_time | vendorpayment.created_time |
| last_modified_time | vendorpayment.last_modified_time |
| created_by_id | vendorpayment.created_by_id |
| created_by_name | vendorpayment.created_by_name |
| credit_account_id | vendorpayment.credit_account_id |
| paid_through_account_id | vendorpayment.paid_through_account_id |
| paid_through_account_name | vendorpayment.paid_through_account_name |
| paid_through_account_type | vendorpayment.paid_through_account_type |
| paid_through_account_type_formatted | vendorpayment.paid_through_account_type_formatted |
| is_paid_via_print_check | vendorpayment.is_paid_via_print_check |
| offset_account_id | vendorpayment.offset_account_id |
| offset_account_name | vendorpayment.offset_account_name |
| is_pre_gst | vendorpayment.is_pre_gst |
| source_of_supply | vendorpayment.source_of_supply |
| source_of_supply_formatted | vendorpayment.source_of_supply_formatted |
| destination_of_supply | vendorpayment.destination_of_supply |
| destination_of_supply_formatted | vendorpayment.destination_of_supply_formatted |
| gst_treatment | vendorpayment.gst_treatment |
| tax_treatment | vendorpayment.tax_treatment |
| gst_return_details | vendorpayment.gst_return_details |
| gst_no | vendorpayment.gst_no |
| reverse_charge_tax_id | vendorpayment.reverse_charge_tax_id |
| is_advance_payment | vendorpayment.is_advance_payment |
| product_description | vendorpayment.product_description |
| is_reverse_charge_applied | vendorpayment.is_reverse_charge_applied |
| is_ach_payment | vendorpayment.is_ach_payment |
| ach_payment_status | vendorpayment.ach_payment_status |
| ach_payment_status_formatted | vendorpayment.ach_payment_status_formatted |
| check_details | vendorpayment.check_details |
| billing_address | vendorpayment.billing_address |
| bills | vendorpayment.bills |
| vendorpayment_refunds | vendorpayment.vendorpayment_refunds |
| comments | vendorpayment.comments |
| imported_transactions | vendorpayment.imported_transactions |
| approvers_list | vendorpayment.approvers_list |
| submitted_date | vendorpayment.submitted_date |
| submitted_date_formatted | vendorpayment.submitted_date_formatted |
| submitted_by | vendorpayment.submitted_by |
| submitted_by_name | vendorpayment.submitted_by_name |
| submitted_by_email | vendorpayment.submitted_by_email |
| submitted_by_photo_url | vendorpayment.submitted_by_photo_url |
| submitter_id | vendorpayment.submitter_id |
| approver_id | vendorpayment.approver_id |
Set Vendorpayment 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.
- Update custom field values
- Manage user-defined data points
- Ensure targeted updates to specific fields
window.onload = function () {
ZFAPPS.extension.init().then(function(App) {
ZFAPPS.set('vendorpayment.<custom_field_api_name>',<value>).then(function (data) {
//response Handling
}).catch(function (err) {
//error Handling
});
});
}
Events
VENDORPAYMENT_SAVED
This event is triggered after the vendorpayment record is successfully saved in your organization. You can use this event to perform post-save actions such as syncing data, triggering notifications, or updating external systems.
ZFAPPS.extension.init().then(function(App) {
App.instance.on('ON_VENDORPAYMENT_SAVED').then(function(data) {
var recordId = data && data.record_id;
ZFAPPS.invoke('SHOW_NOTIFICATION', {
type: 'success',
message: 'Record saved successfully. Record ID: ' + recordId
});
console.log('Saved record ID:', recordId);
}).catch(function(err) {
console.error('Error:', err);
});
});
ON_VENDORPAYMENT_CHANGE
This event is triggered whenever a supported field value is changed within the vendorpayment form. The event is fired based on the configured supported keys, allowing your widget to react dynamically to user input.
ZFAPPS.extension.init().then(function(App) {
App.instance.on('ON_VENDORPAYMENT_CHANGE').then(async function() {
var record = await ZFAPPS.get('vendorpayment');
record = record?.['custom_fields'];
if (record.cf_special_flag) {
ZFAPPS.invoke('SHOW_NOTIFICATION', {
type: 'success',
message: 'Special option selected. Please review additional details before saving.'
});
}
}).catch(function(err) {
console.error('Error:', err);
});
});
ON_VENDORPAYMENT_PRE_SAVE
This event is triggered just before the vendorpayment record is saved in your organization. It allows your widget to validate data, modify field values, or perform custom checks before the save operation is completed.
ZFAPPS.extension.init().then(function(App) {
App.instance.on('ON_VENDORPAYMENT_PRE_SAVE').then(async function() {
var record = await ZFAPPS.get('vendorpayment');
record = record?.['custom_fields'];
if (record.cf_approval_required && !record.cf_approval_notes) {
await ZFAPPS.invoke('SHOW_NOTIFICATION', {
type: 'error',
message: 'Approval notes are required when Approval Required is selected.'
});
return {
prevent_save: true
};
}
}).catch(function(err) {
console.error('Error:', err);
});
});