Email Quote Template
by el_chief
HTML
<link rel="stylesheet" href="//extjs.cachefly.net/ext-4.1.0-gpl/resources/css/ext-all-gray-debug.css" />
<script src="//extjs.cachefly.net/ext-4.1.0-gpl/ext-all-dev.js"></script>
JavaScript
/* this is a function to simulate ajax requests in jsfiddle */
function sim(proxy, data, delay) {
if (typeof data !== 'string') {
data = Ext.JSON.encode(data);
}
proxy.url = '/echo/json/';
proxy.actionMethods.read = "POST";
proxy.extraParams.json = data;
proxy.extraParams.delay = typeof delay == 'undefined' ? 0 : delay;
}
var quote = {
"id": "10",
"created": "2012-07-18 20:17:51",
"created_by": "4",
"modified": "2012-07-18 20:19:19",
"modified_by": "4",
"vehicle_id": "41",
"price": "20000.00",
"note": null,
"assigned_to": "4",
"valid_until": null,
"tax_rate": "0.120000",
"tax_name": "BC HST 12%",
"tradeins_total": "0.00",
"credit_life_insurance": "0.00",
"disability_insurance": "0.00",
"other_fee": "0.00",
"other_fee_name": null,
"finance_downpayment": "0.00",
"finance_term": "48",
"finance_buy_rate": "0.0000",
"finance_sell_rate": "0.0000",
"lien_registration": "0.00",
"security_deposit": "0.00",
"lease_downpayment": "0.00",
"residual": "0.00",
"lease_term": "36",
"lease_buy_rate": "0.0000",
"lease_sell_rate": "0.0000",
"license_registration": "0.00",
"allowance_km": "24000",
"lease_acquisition_fee": "0.00",
"monthly_admin": "0.00",
"cash_deposit": "0.00",
"documentation_service": "0.00",
"finance_lease_start_date": null,
"is_business_use": "0",
"other_warranty": "No Warranty Expressed Or Implied",
"public_id": null,
"type": "Cash",
"createdBy": {
"id": "4",
"created": "2012-07-10 21:45:22",
"modified": "0000-00-00 00:00:00",
"username": "neil",
"email": "[email protected]",
"full_name": "Neil McGuigan",
"disabled": "0",
"title": "General Manager",
"role": "Manager"
},
"contacts": [{
"id": "1",
"guid": "fbead1dc-cae3-11e1-9f7b-1c75080c5d71",
"party_type": "i",
...