/**
* @module template
*/
/**
* HTML template of the contract
*
* @type {string}
*/
const template = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Loan Agreement</title>
<style media="print">
body { font-family:'Times New Roman', serif; line-height: 1.4; }
section { page-break-inside: avoid; }
h1 { page-break-before: always; }
ol { list-style-type: decimal; }
table { width: 100%; }
table th { text-align: left; }
</style>
</head>
<body>
<h1>Important Notes</h1>
<section>
<ol>
<li>This Agreement is an important legal document. It is legally binding on you, the Borrower, when signed. Please carefully read the Agreement in full. By signing, you confirm that you have read and understood the Agreement.</li>
<li>All payments must be made pursuant to this Agreement. Do not pay any intermediaries.</li>
<li>If you have any questions, our information hotline is: +852 9847 4943</li>
<li>You consent to receiving this Agreement in electronic means pursuant to Section 15 of the Electronic Transactions Ordinance (Cap 553, the Laws of Hong Kong). You also agree that an electronic signature is a reliable and appropriate form of your signature, and by pressing the “sign” button or providing a manual signature on an electronic device, these means constitute your electronic signature for the purposes of Section 6 of the Electronic Transactions Ordinance (Cap 553, the Laws of Hong Kong) and such electronic signature shall be deemed to be your personal signature on the Agreement and hence satisfies the requirements of Section 18(1) of the Money Lenders Ordinance (Cap 163, the Laws of Hong Kong).</li>
</ol>
</section>
<h1>Loan Agreement</h1>
<section>
<p>This Agreement is made between Good Financial Limited, licensed money lender number 0372/2019 (hereinafter referred to as the “Lender”) whose business address is Room 1005, Sun House, 181 Des Voeux Road Central, Hong Kong</p>
<p>and</p>
<p>{{borrowerFirstName}} {{borrowerLastName}} (hereinafter referred to as the “Borrower”) whose Hong Kong ID is {{borrowerUniqueNumber}}, and whose address in Hong Kong is {{borrowerAddress}}, Hong Kong</p>
</section>
<section>
<h2>Background</h2>
<p>The Lender has agreed to make available a loan facility to the Borrower on the terms and subject to the conditions of this Agreement.</p>
</section>
<section>
<h2>Definitions</h2>
<p>In this Agreement the following terms shall have the following meanings:</p>
<p>“Financial Indebtedness” means monies borrowed in this transaction or any other transaction, or a liability in respect of any guarantee or indemnity.</p>
<p>“Final Repayment Date” means the maturity date of the loan.</p>
<p>“Employment Contract” means the contract between the Borrower and his/her employer.</p>
<p>“Borrower's Referee” means the person who has consented to act as the referee for the Borrower in respect of the Loan and whose role is confined to providing information on a voluntary basis upon request by the Lender.</p>
</section>
<section>
<h2>Construction</h2>
<p>Any reference in this Agreement to:</p>
<ol>
<li>“The Lender” or “Borrower” shall be construed so as to include its successors in title, permitted assigns and permitted transferees.</li>
<li>“Indebtedness” shall be construed so as to include any obligation (whether incurred as principal or as surety) for the payment or repayment of money, whether present or future, actual or contingent.</li>
<li>a “person” includes any person, firm, company, corporation, government, state or agency of a state or any association, trust or partnership (whether or not having separate legal personality) or two or more of the foregoing.</li>
</ol>
<h2>Loan Terms</h2>
<p><u>Loan Number:</u> {{loanNo}}</p>
{{#isSigned}}
<p><u>Date of Agreement Signing:</u> {{signedOn.date}}</p>
{{/isSigned}}
<p><u>Place of Agreement Signing:</u> This Agreement was negotiated and completed at the office of the Lender</p>
<p><u>Loan Principal Amount:</u> HK\${{principalAmount}} ({{principalAmountInText}}) hereinafter referred to as the “Loan”</p>
<p><u>Loan Drawdown Date:</u> The Lender is giving HK\${{principalAmount}} to the Borrower on {{loanReleaseDate}}</p>
<p><u>Total Amount to be Repaid:</u> HK\${{totalAmount}}</p>
<p><u>Total Amount of Interest Paid:</u> HK\${{totalInterest}}</p>
<p><u>Monthly Flat Interest Rate:</u> {{loanInterest}}%</p>
<p><u>Annualised Percentage Rate (Effective Rate):</u> {{apr}}%</p>
<p><u>Repayment Method:</u> The Borrower will make repayments by QR code at any 7-Eleven in Hong Kong</p>
</section>
<section>
<p><u>Repayment Schedule:</u></p>
<table>
<tr>
<th>Repayment date</th>
<th>Repayment amount</th>
</tr>
{{#loanSchedules}}
<tr>
<td>{{date}}</td>
<td>HK\${{amount}}</td>
</tr>
{{/loanSchedules}}
</table>
<p>The Borrower shall have repaid the Loan and all unpaid interest accrued thereon in full no later than the Final Repayment Date. The Borrower may prepay the whole or any part of the Loan at any time. If a prepayment is made the Borrower shall promptly inform the Lender of such prepayment and the interest owed will be recalculated in line with Section 21 of the Money Lenders Ordinance (Cap 163, the Laws of Hong Kong). Subject to the Lender’s consent (to be given only in its absolute discretion), the Borrower may reborrow any part of the Loan which is repaid or prepaid.</p>
</section>
<section>
<p><u>Security Pledge:</u> The Borrower shall provide a security pledge of HK\${{collateralCollectedAmount}} to the Lender to ensure the due observance and performance of the terms and conditions of this Agreement. This is on terms wholly referable to the provision of the services by the Lender. The scope of services provided by the Lender is i) making available a loan facility for the borrower, ii) providing customer service and replying to queries, iii) providing and maintaining loan repayment collection points for the Borrower to repay, iv) providing debt counselling services as required by the Borrower. In no circumstance does the Lender take security pledges without providing these services. Provided that there is no breach of any terms and conditions, the Lender shall refund the amount without interest within 30 days of the Borrower settling any final outstanding payment to the Lender. If the Borrower breaches the terms of this Agreement, the Lender reserves the right to deduct from the security pledge any loss or damage suffered by the Lender as a result of the Borrower’s breach.</p>
<p><u>Interest:</u> Interest shall accrue on a simple interest basis. When the interest is required to be calculated in respect of a full year period, it shall be calculated on the basis of the actual number of days elapsed in a 365-day year. If the Borrower fails to pay any amount under this Agreement on its due date, interest shall accrue on the overdue amount from the due date up to the date of actual payment (both before and after judgment).</p>
<p><u>Payments:</u> All sums payable under this Agreement shall be made for value on their due date and be paid in immediately available funds free of any restriction, reservation or condition and (except to the extent required by law) without deduction or withholding on account of any amount, whether by way of set-off, counterclaim or otherwise. If a withholding, deduction or set-off is required by law to be made by the Borrower, the amount of the payment due from the Borrower shall be increased to an amount which (after making such withholding, deduction or set-off) leaves an amount equal to the payment which would have been due if no withholding, deduction or set-off had been required.</p>
</section>
<section>
<p><u>Representations and Warranties:</u></p>
<p>The Borrower hereby represents and warrants that:</p>
<ol>
<li>he/she is not a minor and is of full age and of sound mind;</li>
<li>he/she is not by reason of illness or incapacity (whether mental, physical or legal), incapable of managing his/her own affairs;</li>
<li>no order has been made or a trustee or a committee of estate appointed in respect of him/her under the Mental Health Ordinance or any similar legislation in any jurisdiction which would prevent him/her being bound by this Agreement nor has any step or procedure been taken in any jurisdiction which would restrict his/her ability or legal capacity to enter into this Agreement or would require the approval or a third party or any authority;</li>
<li>he/she fully understands the contents of this Agreement and the nature and extent of his/her obligation and liability under this Agreement and has acted independently and free from any undue influence by any person;</li>
<li>he/she is acting as principal and for his/her own account and not as agent or trustee or in any other capacity on behalf of any third party;</li>
<li>he/she has either obtained independent legal advice or has voluntarily waived his/her right to such independent legal advice with respect to this Agreement and the transaction contemplated thereby prior to his/her execution of this Agreement;</li>
<li>this Agreement constitutes, or when executed in accordance with its terms will constitute, his/her legal, valid and binding obligations enforceable in accordance with its terms;</li>
<li>no litigation, arbitration or administrative proceedings of or before any court, arbitral body or agency have been started or threatened against him/her;</li>
<li>no steps have been taken by him/her nor have any legal proceedings been started or threatened for his/her bankruptcy or for the appointment of a receiver, trustee, administrator, agent or similar officer;</li>
<li>the Employment Contract has not been terminated and will remain valid and in effect so long as any amount remains outstanding or unpaid under this Agreement and there are no discussions between the Borrower and the employer to terminate the Employment Contract;</li>
<li>no Event of Default is continuing or might reasonably be expected to result from the making of the Loan;</li>
<li>any information provided by him/her in connection with or for the purposes of this Agreement was true, accurate and complete as at the date it was provided or as at the date (if any) at which it is stated;</li>
<li>nothing has occurred or been omitted and no information has been given or withheld that results in the information given in the loan application being untrue or misleading in any respect;</li>
<li>any personal data provided by him/her in connection with or for the purposes of this Agreement has been given in compliance with the Personal Data (Privacy) Ordinance (Chapter 486 of the Laws of Hong Kong); and</li>
<li>details of any Financial Indebtedness incurred by him/her has been fully declared to the Lender.</li>
</ol>
</section>
<section>
<p><u>Covenants:</u></p>
<p>The Borrower covenants that, so long as any amount remains outstanding or unpaid under this Agreement, he/she will:</p>
<ol>
<li>promptly supply such information regarding him/her to the Lender as the Lender may require;</li>
<li>inform the Lender of any default or breach by him/her of any provision of this Agreement within one (1) business day of such default or breach and provide the Lender with evidence and a detailed explanation of the circumstances giving rise to such default or breach (and the steps being taken to remedy it);</li>
<li>not incur any further Financial Indebtedness without the prior written consent of the Lender;</li>
<li>not make any loan to, grant any guarantee or give any reference in favour of, any person;</li>
<li>not terminate the Employment Contract;</li>
<li>if his/her employment pursuant to the Employment Contract is terminated, inform the Lender and give the Lender written evidence of his/her termination of employment within one (1) business day of such termination and visit the Lender at the Lender’s office within three (3) business days of such termination;</li>
<li>if his/her employment pursuant to the Employment Contract is terminated, promptly inform the Lender and give evidence to the Lender of any new employment contract entered into by him/her and a prospective employer;</li>
<li>if his/her employment pursuant to the Employment Contract is terminated, use severance pay to settle any outstanding balance of the Loan;</li>
<li>promptly upon becoming aware of them, inform the Lender of the details of any litigation, arbitration or administrative proceedings which are current, threatened or pending against him/her; and</li>
<li>immediately, inform the Lender of any change of his/her contact details.</li>
</ol>
</section>
<section>
<p><u>Events of Default:</u></p>
<p>Each of the events set out below is an Event of Default (whether or not its occurrence is caused by any person outside the control of the Borrower or any other person):</p>
<ol>
<li>the Borrower fails to pay any amount payable by him/her under this Agreement at the time, in the currency and in the manner in which it is expressed to be payable unless any failure to pay is caused solely by a technical or administrative delay or error in the transmission of funds outside the control of the Borrower and such failure is remedied to the satisfaction of the Lender within two (2) business days of the due date; or</li>
<li>any representation, warranty or statement made or deemed to be made by the Borrower in this Agreement or in any notice or other document, certificate or statement delivered by him/her pursuant to, or in connection with, this Agreement is or proves to have been incorrect or misleading in any respect when made or deemed to be made; or</li>
<li>the Borrower incurs further Financial Indebtedness without the prior written consent of the Lender; or</li>
<li>the Borrower makes a loan to, grants a guarantee or gives a reference in favour of, any person; or</li>
<li>the Borrower terminates the Employment Contract; or</li>
<li>the Borrower becomes of unsound mind and/or by reason of illness or incapacity (whether mental, physical or legal), is incapable of managing his/her own affairs; or</li>
<li>the Borrower fails duly to perform or comply with any undertaking or other obligation owed or assumed by him/her under this Agreement and, if any such non-performance or non-compliance is, in the opinion of the Lender, capable of remedy, it is not remedied to the satisfaction of the Lender within seven (7) business days after the Lender has given notice to the Borrower of such non-performance or non-compliance; or</li>
<li>any Financial Indebtedness of the Borrower becomes prematurely due and payable as a result of default or is not paid when due or any right to borrow to which the Borrower is entitled is withdrawn or terminated as a result of default; or</li>
<li>the Borrower is unable or admits inability to pay his/her debts as they fall due, suspends making payments on any of his/her debts or, by reason of actual or anticipated financial difficulties, commences negotiations with one or more of his/her creditors with a view to rescheduling any of his/her indebtedness; or</li>
<li>any action is taken in any jurisdiction for the suspension of payments by, or the bankruptcy of, the Borrower or a composition, assignment or arrangement with any creditor of the Borrower or a trustee in bankruptcy, receiver, prospective receiver or similar officer is appointed in respect of the Borrower; or</li>
<li>any other event or series of events, whether related or not, occurs which in the opinion of the Lender is likely to have a material adverse effect upon the ability or willingness of the Borrower to comply with all or any of his/her obligations under this Agreement.</li>
</ol>
<p>The Lender may at any time, if an Event of Default has occurred which has not been remedied or waived, do any one or more of the following:</p>
<ol>
<li>by notice in writing to the Borrower, declare any part of the Loan to be immediately due and payable, whereupon the same will become immediately due and payable together with all accrued interest thereon; and/or</li>
<li>immediately contact the Borrower and the Borrower's Referee; and/or</li>
<li>exercise any or all or its rights, remedies, powers or discretions under this Agreement or at law; and/or</li>
<li>charge an administration fee of HK$20 per month for making all the necessary arrangements to collect any overdue amounts so long as such overdue amount remains due and outstanding.</li>
</ol>
<p><u>Indemnity:</u> The Borrower shall indemnify the Lender in respect of any loss, costs (including legal costs), claims or expenses incurred as a consequence of the failure by the Borrower to make any payment under this Agreement on its due date; the occurrence of any other Event of Default; and the enforcement of the terms of this Agreement.</p>
<p><u>Exercise of Rights:</u> No failure to exercise or delay in exercising, on the part of the Lender, any right, remedy or power hereunder shall operate as a waiver nor shall any single or partial exercise preclude any further or other exercise of any right, remedy or power, whether the same or another right, remedy or power. The powers, rights and remedies of the Lender are cumulative and not exclusive of any rights or remedies provided by law.</p>
<p><u>Partial Invalidity:</u> If, at any time, any provision of this Agreement is or becomes illegal, invalid or unenforceable in any respect under any law of any jurisdiction, neither the legality, validity or enforceability of the remaining provisions nor the legality, validity or enforceability of such provision under the law of any other jurisdiction will in any way be affected or impaired.</p>
<p><u>Remedies and Waivers Cumulative:</u> No failure to exercise, nor any delay in exercising, on the part of the Lender, any right or remedy under this Agreement shall operate as a waiver, nor shall any single or partial exercise of any right or remedy prevent any further or other exercise or the exercise of any other right or remedy. The rights and remedies provided in this Agreement are cumulative and not exclusive of any rights or remedies provided by law.</p>
<p><u>Amendments and Waivers:</u> Any term of this Agreement may be amended or waived only with the written consent of the Lender and the Lender shall give the Borrower written notice of any amendments it makes to this Agreement.</p>
<p><u>Set off:</u> The Lender may, but shall not be obliged to, set-off against any monies actually and/or contingently due and payable by the Borrower to the Lender under this agreement any monies due to the Borrower from the Lender.</p>
<p><u>Assignment:</u> The rights of the Borrower under this Agreement are personal to him/her and he/she may not assign or transfer any of his/her rights or obligations under this Agreement without the consent of the Lender. The Lender may assign, sub-contract, delegate, transfer, mortgage, charge or otherwise dispose of its rights and obligations under this Agreement as it may see fit.</p>
<p><u>Whole Agreement:</u> This Agreement embodies the entire agreement of the parties hereto in relation to the subject matter hereof and this Agreement shall supersede all other agreements and/or understandings whether written or oral in relation to the subject matter hereof.</p>
<p><u>Counterparts:</u> This Agreement may be executed in any number of counterparts, and this has the same effect as if the signatures on the counterparts were on a single copy of this Agreement.</p>
<p><u>Governing Law:</u> This Agreement shall be governed by and construed in accordance with the laws of Hong Kong.</p>
<p><u>Enforcement:</u> The courts of Hong Kong have exclusive jurisdiction to settle any dispute arising out of or in connection with this Agreement (including a dispute regarding the existence, validity or termination of this Agreement). The parties agree that the courts of Hong Kong are the most appropriate and convenient courts to settle disputes and accordingly no party will argue to the contrary. This clause is for the benefit of the Lender only. As a result, the Lender shall not be prevented from taking proceedings relating to a dispute in any other courts with jurisdiction. To the extent allowed by law, the Lender may take concurrent proceedings in any number of jurisdictions.</p>
{{#isSigned}}
<p><strong>This agreement is signed electronically by the aforementioned parties on {{signedOn.full}}.</strong></p>
{{/isSigned}}
</section>
<section>
<h1>Summary of Provisions of the Money Lenders Ordinance</h1>
<p>FORM OF SUMMARY OF PROVISIONS OF THE ORDINANCE TO BE INCLUDED IN OR ATTACHED TO A NOTE OR MEMORANDUM OF A LOAN AGREEMENT.</p>
<p>The provisions of the Money Lenders Ordinance summarized below are important for the protection of all the parties to a loan agreement, and should be read carefully. The summary is not part of the law, and reference should be made to the provisions of the Ordinance itself in case of doubt.</p>
<h1>Summary of Part III of the Ordinance-Money lenders transactions</h1>
<p>Section 18 sets out the requirements relating to loans made by a money lender. Every agreement for a loan must be put into writing and signed by the borrower within 7 days of making the agreement and before the money is lent. A copy of the signed note of the agreement must be given to the borrower, with a copy of this summary, at the time of signing. The signed note must contain full details of the loan, including the terms of repayment, the form of security and the rate of interest. An agreement which does not comply with the requirements will be unenforceable, except where a court is satisfied that it would be unjust not to enforce it.</p>
<p>Section 19 provides that a money lender must, if requested in writing and on payment of the prescribed fee for expenses, give the original and a copy of a written statement of a borrower’s current position under a loan agreement, including how much has been paid, how much is due or will be due, and the rate of interest. The borrower must endorse on the copy of the statement words to the effect that he has received the original of the written statement and return the copy as so endorsed to the money lender. The money lender must retain the copy of the statement so returned during the continuance of the agreement to which that statement relates. If the money lender does not do so he commits an offence. The money lender must also, upon a request in writing, supply a copy of any document relating to the loan or security. But a request cannot be made more than once per month. Interest is not payable for so long as the money lender, without good reason, fails to comply with any request mentioned in this paragraph.</p>
<p>Section 20 provides that the surety, unless he is also the borrower, must within 7 days of making the agreement be given a copy of the signed note of the agreement, a copy of the security instrument (if any) and a statement with details of the total amount payable. The money lender must also give the surety, upon request in writing at any time (but not more than once per month) a signed statement showing details of the total sum paid and remaining to be paid. The security is not enforceable for so long as the money lender, without good reason, fails to comply.</p>
<p>Section 21 provides that a borrower may at any time, on giving written notice, repay a loan together with interest to the date of repayment, and no higher rate of interest may be charged for early repayment.</p>
<p>This provision, however, will not apply where the money lender is recognized, or is a member of an association recognized, by the Financial Secretary by notice in the Gazette in force under section 33A(4) of the Ordinance.</p>
<p>Section 22 states that a loan agreement is illegal if it provides for the payment of compound interest, or provides that a loan may not be repaid by instalments. A loan agreement is also illegal if it charges a higher rate of interest on amounts due but not paid, although it may provide for charging simple interest on that part of the principal and interest outstanding at a rate not exceeding the rate payable apart from any default. The illegal agreement may, however, be declared legal in whole or in part by a court if the court is satisfied that it would be unjust if the agreement were illegal because it did not comply with this section.</p>
<p>Section 23 declares that a loan agreement with a money lender and any security given for the loan will not be enforceable if the money lender was unlicensed at the time of making the agreement or taking the security. The loan agreement or security may, however, be declared enforceable in whole or in part by a court if the court is satisfied that it would be unjust if the agreement or security were unenforceable by virtue of this section.</p>
<h1>Summary of Part IV of the Ordinance-Excessive interest rates</h1>
<p>Section 24 fixes the maximum effective rate of interest on any loan at 60% per annum (the “effective rate” is to be calculated in accordance with the Second Schedule to the Ordinance). A loan agreement providing for a higher effective rate will be unenforceable and the lender will be liable to prosecution. This maximum rate may be changed by the Legislative Council but not so as to affect existing agreements. The section does not apply to any loan made to a company which has a paid up share capital of not less than $1000000 or, in respect of any such loan, to any person who makes that loan.</p>
<p>Section 25 provides that where court proceedings are taken to enforce a loan agreement or security for a loan or where a borrower or surety himself applies to a court for relief, the court may look at the terms of the agreement to see whether the terms are grossly unfair or exorbitant (an effective rate of interest exceeding 48% per annum or such other rate as is fixed by the Legislative Council, may be presumed, on that ground alone, to be exorbitant), and, taking into account all the circumstances, it may alter the terms of the agreement in such a manner as to be fair to all parties. The section does not apply to any loan made to a company which has a paid up share capital of not less than $1000000 or, in respect of any such loan, to any person who makes that loan.</p>
</section>
</body>
</html>
`;
module.exports = template;