=== Aluleth Proposals ===
Contributors: aluleth
Tags: proposal, quote, estimate, e-signature, contract
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.5.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Proposals and quotes your clients read, accept and sign on one private page, with a signed PDF and its record. No fee per user or per document.

== Description ==

Aluleth Proposals turns the quote you used to write in a word processor into a page your client opens with one link: they read it, ask a question, and accept it with an electronic signature. You get the signed PDF and a record of the signature, and everything stays in your WordPress database.

**Make a proposal**

* Start from a template (website and shop, monthly retainer, consulting, event or photography, simple quote) or a blank page.
* Sections you move up and down: cover, text, image, video link, team, pricing, timeline and terms.
* Pricing tables with quantities, units, discounts and tax per line, in 30 currencies. The total is worked out as you type.
* A number for each proposal (your own format, with the year if you like) and an end date.
* Preview it as the client will see it, or download it as a PDF.

**Send it**

* One email to the client with a private link (from your site's mail, or Aluleth SMTP when it is active). Or copy the link and send it yourself.
* Changing a proposal after sending makes a new version. The client sees the version you sent until you send the new one, and the first one stays in the history.

**What the client sees**

* A clean page with your company name, logo and colour, outside your theme, never indexed by search engines.
* They can ask a question about any part. You answer from WordPress and they get your answer by email.
* They accept by drawing their signature (mouse or finger) or by typing their name (always possible, for people who use a keyboard or a screen reader), and ticking that they agree to sign electronically. Or they decline and tell you why.
* After signing, both of you get the signed PDF by email.

**The record of the signature**

* Who signed, their email, the time, the IP address, the browser, the version signed and a SHA-256 fingerprint of that exact content, on the last page of the signed PDF and in WordPress.
* Check a PDF someone sends you: the plugin tells you whether it is exactly the signed copy kept on your site.
* This is a simple electronic signature with a record of how it was given. The plugin does not say whether it meets the rules for your documents in your country: some documents need a handwritten, advanced or qualified signature. Check with a lawyer when in doubt.
* The signer is the person who had the link and typed their name: the plugin does not check identity documents. "Link sent to" in the record is the address the link was sent to.

**Follow what happens**

* The list shows what is waiting for a signature, what was signed this month, your win rate and how long clients take to sign.
* Each proposal has its activity: sent, opened (with the browser and device), questions, new versions, signed or declined.
* Openings are counted by the page itself once it is shown in a browser (mail scanners that only fetch the link are not counted): no cookie, no outside service.

**Quote requests and shop products**

* With Aluleth Forms: choose your quote request forms in the settings. Each entry becomes a proposal draft with the client and their answers, and you get an email to price it and send it. Nothing goes to the client until you send it.
* With WooCommerce or FluentCart: search a product by name or SKU in a pricing table to add it as a line with its shop price before tax. You can change the line afterwards.

**Aluleth Proposals Pro (paid add-on)**

* Clients choose a package, tick optional lines and set quantities, and see the total change.
* A deposit or the full amount paid at signing through WooCommerce or FluentCart, and the balance later.
* Reminders before the end date, follow-ups when a proposal was opened but not signed, and approval above an amount.
* Contracts: other people sign after the client (in order or not), your team countersigns, a code sent by email checks each signer's address, and PDFs (your contract, your terms) are signed with the proposal.
* A content library: save a section once, add it to any proposal.

**Works with the other Aluleth plugins**

* Sending a proposal adds the client to your Aluleth contacts. "Sent", "opened", "signed", "declined" and "ended" appear on the contact's timeline.
* Aluleth CRM: these five can start automations ("once per person" means once per proposal, so each new proposal can start it again), and the contact page lists their proposals with a button to make a new one for them.
* Aluleth Insights: "A proposal is signed" can be a goal, counted with its amount when the client signs from a counted visit.
* Team members do not need to be administrators: give them the "Proposals" access in Aluleth › Settings › Access.

== Installation ==

1. Install and activate the plugin.
2. Go to Aluleth › Proposals › Settings and add your company name, logo and colour.
3. Click "New proposal", choose a template, fill it in and send it.

== Frequently Asked Questions ==

= Does my client need an account? =

No. The private link is the key. Anyone with the link can open the proposal, so send it only to your client.

= Can I change the address of the client pages? =

Yes, in the settings. Links already sent with an earlier address keep working.

= Can I change a proposal after sending it? =

Yes, until it is signed or declined. The client sees the new version only when you send it. Signed proposals cannot change; copy them as a new proposal instead.

= Where are the signed PDFs kept? =

In a private folder of your uploads (wp-content/uploads/aluleth-proposals, in a folder with a random name), each file with a random name, and only sent by the plugin's own pages after their checks. They are sent by email to the client and to you, and can be downloaded from the proposal in WordPress or from the client's page.

The folder is closed with .htaccess (Apache, LiteSpeed) and web.config (IIS). Nginx does not read these files: the plugin checks every day whether a test file can be opened by its address and, if so, shows the rule to add on the Aluleth screens (`location ^~ /wp-content/uploads/aluleth-proposals/ { deny all; }`). You can also keep the files in a folder outside your website: add `define( 'ALULETH_PROPOSALS_FILES_DIR', '/path/outside/the/website' );` to wp-config.php: new files go there, and the files saved before move there with the daily task (a notice tells you when the folder cannot be used).

= Which characters does the PDF support? =

Western European languages (the standard PDF fonts). Other scripts show as "?" in the PDF; the page itself shows every language.

= What is stored about the client? =

Their name, email and company, the proposals sent to them, their questions, and for a signature: the name typed, the drawing, the time, the IP address and the browser. Visits are counted without cookies; to count a visitor once per half hour, a counter under a salted hash of their IP address and browser is kept for that half hour and deleted by the daily clean-up.

= Can clients get their data or ask to erase it? =

Yes, with WordPress's own tools (Tools › Export Personal Data and Erase Personal Data). The export holds their proposals, questions and answers, and signatures. Erasing takes their name, email, company, questions, answers to a quote request and decline reason out of the proposals they received that are not signed (also their name in titles and texts), and the link they were sent stops working. Signed proposals are kept with their signature, as the record of the agreement, and the eraser says which ones.

= My site is behind Cloudflare or another proxy =

Then the IP address WordPress sees is the proxy's. Return the visitor's real address with the `aluleth/client_ip` filter (shared by every Aluleth plugin), so signatures record it and the limit of 30 forms an hour applies per visitor.

== Changelog ==

= 0.5.2 =
* Signed PDFs and documents: kept in a private folder with a random name (older files move there). A daily check tells the site admins when the web server (Nginx) lets the folder be opened, with the rule to add; ALULETH_PROPOSALS_FILES_DIR in wp-config.php keeps them outside the website.
* "Your turn" emails to signers are recorded before they are sent, with a unique key: two people signing at the same moment never send them twice.
* Limits and counts (forms sent, openings, quote requests) are counted in one database statement, so requests at the same moment are all counted.
* A signed PDF is made once, also when it is downloaded twice at the same moment.
* Two proposals saved at the same moment cannot get the same number.
* Works without the mbstring PHP extension.
* WooCommerce: declared compatible with its order tables (HPOS) and block checkout.
* Complete copies: Aluleth Proposals can be carried inside Aluleth Proposals Pro; this plugin then stays off and its data is shared.

= 0.5.1 =
* Signed PDF: small headings of text parts (such as the terms) are printed in bold, with lists and paragraphs kept apart.
* Signed PDF: the name of a document signed with the proposal has its own line, so a long name no longer runs over its size and fingerprint.
* Activity: a line written by an add-on that is turned off shows a readable name instead of its internal key.

= 0.5.0 =
* Ready for what happens after signing (with Aluleth Proposals Pro): hooks when a proposal is made, copied, sent, ends, is open again or has its client's data erased.
* Each part of the client page carries its id (time read per part, with Aluleth Proposals Pro), and a hook for quiet messages of the page.
* Several signers: the team's email once everyone has signed says "Signed by everyone".
* Hooks for add-on screens (reports) and for the new proposal screen.

= 0.4.0 =
* Ready for several signers (with Aluleth Proposals Pro): the client signs first, then each other person with their own link; the proposal is "Being signed" until everyone has signed, and the signed PDF holds every signature with its record.
* Documents signed with the proposal: listed on the client page with their fingerprint, downloaded from it, and listed in the signed PDF.
* Notes kept with a signature (such as an email code checked) are shown in the record and the signed PDF.
* Personal data: people asked to sign besides the client get their own export, and are taken out of proposals not signed when their data is erased.

= 0.3.0 =
* Ready for Aluleth Proposals Pro: packages, optional lines, quantities set by the client and lines paid every month or year (shown apart from the total). The signed copy, its PDF and its fingerprint keep the client's choices.
* Hooks for add-ons on the client page, the editor, the settings, the PDF and the activity.

= 0.2.0 =
* Quote requests: entries of chosen Aluleth Forms forms become proposal drafts.
* Products from WooCommerce or FluentCart in pricing tables.
* Personal data export and erase (WordPress privacy tools), and text for your privacy policy.
* Aluleth CRM: five automation triggers and a "Proposals" card on the contact page.
* Aluleth Insights: "A proposal is signed" goal.

= 0.1.0 =
* First version: templates, sections and pricing tables, private client page, questions and answers, drawn or typed signature with its record, signed PDF, versions, end dates, activity and key numbers.
