function pminvoice_token_list in Drupal PM (Project Management) 7
File
- pminvoice/pminvoice.module, line 874
- 1: Hooks (help, perm, init, menu, theme, node_info)
2: Access functions
3: Load organization and project details
4: Invoice create / edit form
5: Invoice node manipulation functions
6: Admin settings
7: Views hook
8: Project Managementinvoiceitem…
Code
function pminvoice_token_list($type = 'all') {
$tokens = array();
if ($type == 'node' || $type == 'all') {
$tokens['node']['pminvoice-number'] = t('Project Management Invoice: Number.');
$tokens['node']['pminvoice-reference'] = t('Project Management Invoice: Reference.');
$tokens['node']['pminvoice-organization-nid'] = t('Project Management Invoice: Organization Node ID.');
$tokens['node']['pminvoice-organization-title'] = t('Project Management Invoice: Organization Title.');
$tokens['node']['pminvoice-project-nid'] = t('Project Management Invoice: Project Node ID.');
$tokens['node']['pminvoice-project-title'] = t('Project Management Invoice: Project Title.');
$tokens['node']['pminvoice-amount'] = t('Project Management Invoice: Amount.');
$tokens['node']['pminvoice-total'] = t('Project Management Invoice: Total.');
$tokens['node']['pminvoice-totalcustomer'] = t('Project Management Invoice: Total in customer currency.');
$tokens['node']['pminvoice-taxexempt'] = t('Project Management Invoice: Tax Exempt.');
if (variable_get('pm_tax1_app', 0)) {
$tokens['node']['pminvoice-tax1'] = t('Project Management Invoice: ' . variable_get('pm_tax1_name', 'VAT') . '.');
}
if (variable_get('pm_tax2_app', 0)) {
$tokens['node']['pminvoice-tax2'] = t('Project Management Invoice: ' . variable_get('pm_tax2_name', 'Tax 2') . '.');
}
}
return $tokens;
}