diff --git a/README.md b/README.md index 87fd565..ee6ee85 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ Estimates and invoices keep their number, date, customer, total, sales tax and * * Time lines are linked to their time activities, so QuickBooks marks the time as billed. Estimates the invoice was made from, or imported into it, are linked and closed when it's saved. * **Custom fields from the work orders**: the issues behind an invoice are the ones its time lines and lineitems estimates name. Plugins can fill custom fields from them when they're imported, and block a save (e.g. redmine_qbo_vehicles fills the VIN and mileage and allows one vehicle per invoice). On its own, redmine_qbo leaves the boxes as typed. * **Sales person**: an invoice credits the sales person on the estimate it was made from (the first linked estimate that names one); if none does, the user who writes the invoice. -* Invoices show their status, worked out from the balance and due date like QuickBooks' invoice list: **Paid**, **Partially paid**, **Overdue**, **Open** or **Voided** (a zero total), on the customer page's invoice list and the invoice page. A paid invoice shows the day it was paid in full (e.g. **Paid 11/03/2026**): the later of its date and the last payment or credit memo applied to it. +* Invoices show their status, worked out from the balance and due date like QuickBooks' invoice list: **Paid**, **Partially paid**, **Overdue**, **Open** or **Voided** (a zero total), on the customer page's invoice list and the invoice page. A paid invoice shows when it was paid in full (the later of its date and the last payment or credit memo applied to it): on the customer page's list, **Paid** when it was paid the day it was written, or **Paid +3d** when it was paid in full 3 days after its date, with the date when hovering over it; on the invoice page, the date (e.g. **Paid 11/03/2026**). * Invoices with a payment applied open read-only. The due date is left to QuickBooks (from the customer's terms) unless one is picked. The "default message shown on invoices" fills in the message. ### Payments @@ -250,7 +250,7 @@ Hook|:qbo_billing_issues_created, { estimate:, issues:, params: } | Called after Hook|:qbo_billing_field_defaults, { customer:, issues: } | Return `{ field_id => value }` for a document's work orders: used when an invoice is made from an estimate, for the fields it leaves blank. New estimates and invoices start blank (redmine_qbo_vehicles: the work orders' VIN and highest mileage) Hook|:qbo_billing_field_options, { customer: } | Return `{ field_id => [{ value:, label: }, ...] }` to suggest in the editor's custom field boxes for a customer (redmine_qbo_vehicles: the customer's vehicles for the VIN box) View|:view_qbo_estimate_form_bottom, { form:, document: } | Add your plugin's script to the estimate/invoice editor. It can use `window.qboEditor` (`field(id)`, `fieldNamed(/name/)`, `setFieldOptions(id, options)`) and listen for `qbo:customer-changed` and `qbo:imported` on the form (redmine_qbo_vehicles fills the VIN and mileage) -View|checkboxes with `data-new-issue-param="issue[field]"` on the customer page | Ticking one adds `issue[field]=value` to the New issue link, one per field (redmine_qbo's estimates, redmine_qbo_vehicles' vehicles) +View|checkboxes with `data-new-issue-param="issue[field]"` and `data-appointment-param="field"` on the customer page | Ticking one adds `issue[field]=value` to the New issue link and `field=value` to redmine_qbo_calendar's Add appointment link (`#appointment_link`), one per field (redmine_qbo's estimates: `estimate_id`, redmine_qbo_vehicles' vehicles: `vehicle_id`) View Hook|:view_qbo_estimate_contextual, { estimate_id:, customer_id:, custom_fields:, doc_number: } | Adds links to an estimate page's action area (e.g. redmine_qbo_calendar's Add appointment); `custom_fields` is `{ field_id => value }` View Hook|:view_qbo_invoice_contextual, { invoice_id:, customer_id:, doc_number: } | Adds links to an invoice page's action area (e.g. redmine_qbo_labels' Print label) diff --git a/app/views/customers/_new_issue_link_script.html.erb b/app/views/customers/_new_issue_link_script.html.erb index 6bb9864..5ab1858 100644 --- a/app/views/customers/_new_issue_link_script.html.erb +++ b/app/views/customers/_new_issue_link_script.html.erb @@ -1,45 +1,58 @@ <%# - Adds what's ticked on the customer page to the "New issue" link (#dynamic-new-issue-link in the contextual - area). Any checkbox with data-new-issue-param="issue[field]" takes part, one ticked per field: this plugin's - estimates (issue[estimate_id]), and other plugins' lists (e.g. redmine_qbo_vehicles' issue[vehicle_id]). + Adds what's ticked on the customer page to its links: "New issue" (#dynamic-new-issue-link in the contextual area) + and redmine_qbo_calendar's "Add appointment" (#appointment_link). A checkbox takes part with + data-new-issue-param="issue[field]" (New issue) and data-appointment-param="field" (Add appointment); one is + ticked per field: this plugin's estimates (estimate_id), and other plugins' lists (e.g. redmine_qbo_vehicles' + vehicle_id). %> diff --git a/app/views/customers/show.html.erb b/app/views/customers/show.html.erb index 6d0bf7c..72b8f06 100644 --- a/app/views/customers/show.html.erb +++ b/app/views/customers/show.html.erb @@ -52,7 +52,7 @@