mirror of
https://github.com/itflow-org/itflow
synced 2026-09-01 20:35:12 +00:00
Add Quick Send Quote / Invoice to replicate the old single click to Send Email
This commit is contained in:
@@ -814,6 +814,30 @@ function documentContactFilterSql($document_type) {
|
||||
return "AND (contact_primary = 1 OR contact_billing = 1)";
|
||||
}
|
||||
|
||||
/*
|
||||
* Which of the offered contacts are selected by default, as a SQL fragment.
|
||||
*
|
||||
* Two things read this and they must agree: the Send Email picker uses it to
|
||||
* decide which boxes open ticked, and Quick Send uses it as the whole
|
||||
* recipient list - Quick Send is exactly "send to the ticked ones without
|
||||
* opening the modal".
|
||||
*
|
||||
* invoice - primary and billing, which is everyone the picker offers. A bill
|
||||
* has no recipient you would routinely leave out.
|
||||
* quote - primary only. Technical and important contacts are offered
|
||||
* because they often want the quote, but sending unasked to
|
||||
* someone who did not request pricing is not a safe default.
|
||||
*
|
||||
* Always a subset of documentContactFilterSql() for the same document type.
|
||||
*/
|
||||
function documentDefaultContactFilterSql($document_type) {
|
||||
if ($document_type === 'quote') {
|
||||
return "AND contact_primary = 1";
|
||||
}
|
||||
|
||||
return "AND (contact_primary = 1 OR contact_billing = 1)";
|
||||
}
|
||||
|
||||
/*
|
||||
* The delivery methods offered by the Mark Sent modal on invoices and quotes.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user