151 lines
2.1 KiB
Markdown
151 lines
2.1 KiB
Markdown
---
|
|
type: contract
|
|
vendor:
|
|
status: active
|
|
category:
|
|
contract_start:
|
|
contract_end:
|
|
annual_cost:
|
|
currency:
|
|
contract_value:
|
|
billing_frequency:
|
|
payment_terms:
|
|
auto_renewal:
|
|
notice_days:
|
|
notice_deadline:
|
|
renewal_status: not-due
|
|
purchase_order:
|
|
account_manager:
|
|
criticality: medium
|
|
---
|
|
|
|
<%*
|
|
const vendor = await tp.system.prompt("Vendor name");
|
|
|
|
if (!vendor) {
|
|
new Notice("Contract creation cancelled.");
|
|
return;
|
|
}
|
|
|
|
const safeVendor = vendor
|
|
.replace(/[\\/:\*?"<>|]/g, "-")
|
|
.trim();
|
|
|
|
const startDate = await tp.system.prompt(
|
|
"Contract start date (YYYY-MM-DD)"
|
|
);
|
|
|
|
const endDate = await tp.system.prompt(
|
|
"Contract end date (YYYY-MM-DD)"
|
|
);
|
|
|
|
if (!startDate || !endDate) {
|
|
new Notice("Contract creation cancelled: dates required.");
|
|
return;
|
|
}
|
|
|
|
const startYear = startDate.substring(0, 4);
|
|
const endYear = endDate.substring(0, 4);
|
|
|
|
const currentFile = tp.file.find_tfile(tp.file.path(true));
|
|
|
|
await app.fileManager.processFrontMatter(
|
|
currentFile,
|
|
(frontmatter) => {
|
|
frontmatter.vendor = vendor;
|
|
frontmatter.contract_start = startDate;
|
|
frontmatter.contract_end = endDate;
|
|
}
|
|
);
|
|
|
|
const folder = "20 Work/Contracts/Active";
|
|
|
|
if (!app.vault.getAbstractFileByPath("20 Work/Contracts")) {
|
|
await app.vault.createFolder("20 Work/Contracts");
|
|
}
|
|
|
|
if (!app.vault.getAbstractFileByPath(folder)) {
|
|
await app.vault.createFolder(folder);
|
|
}
|
|
|
|
await tp.file.move(
|
|
`${folder}/${safeVendor} - ${startYear}-${endYear}`
|
|
);
|
|
|
|
tR += `# ${vendor} - ${startYear}-${endYear}`;
|
|
-%>
|
|
|
|
## Contract Summary
|
|
|
|
**Service / Product:**
|
|
|
|
**Purpose:**
|
|
|
|
**Business owner:**
|
|
|
|
---
|
|
|
|
## Commercial Terms
|
|
|
|
**Annual cost:**
|
|
|
|
**Total contract value:**
|
|
|
|
**Currency:**
|
|
|
|
**Billing frequency:**
|
|
|
|
**Payment terms:**
|
|
|
|
**Purchase order:**
|
|
|
|
---
|
|
|
|
## Renewal
|
|
|
|
**Contract end:**
|
|
|
|
**Auto-renewal:**
|
|
|
|
**Notice period:**
|
|
|
|
**Notice deadline:**
|
|
|
|
**Expected price increase:**
|
|
|
|
**Renewal decision:**
|
|
|
|
---
|
|
|
|
## Services / Entitlements
|
|
|
|
-
|
|
|
|
---
|
|
|
|
## Contacts
|
|
|
|
| Role | Name | Email |
|
|
|---|---|---|
|
|
| Account Manager | | |
|
|
| Technical Contact | | |
|
|
| Support | | |
|
|
|
|
---
|
|
|
|
## Risks / Considerations
|
|
|
|
-
|
|
|
|
---
|
|
|
|
## Renewal History
|
|
|
|
-
|
|
|
|
---
|
|
|
|
## Notes
|
|
|
|
-
|