feat: hide authorizer for rental orders, auto-set sale type

Rental orders no longer show the "Authorizer Required?" question or
the Authorizer field. The sale type is automatically set to 'Rentals'
when creating or confirming a rental order. Validation logic also
skips authorizer checks for rental sale type.

Made-with: Cursor
This commit is contained in:
gsinghpal
2026-02-25 23:33:23 -05:00
parent 3c8f83b8e6
commit 14fe9ab716
51 changed files with 4192 additions and 822 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Fusion Rental Enhancement
Fusion Rental
License OPL-1 (Odoo Proprietary License v1.0)
Rental Agreement Document - Compact 2-Page Layout
-->
@@ -14,11 +14,11 @@
<style>
.fc-rental { font-family: Arial, sans-serif; font-size: 8pt; line-height: 1.3; }
.fc-rental h1 { color: #0066a1; font-size: 14pt; text-align: center; margin: 5px 0 10px 0; }
.fc-rental h2 { color: #0066a1; font-size: 9pt; margin: 6px 0 3px 0; font-weight: bold; }
.fc-rental h1 { color: #0066a1; font-size: 14pt; text-align: center; margin: 5px 0 8px 0; }
.fc-rental h2 { color: #0066a1; font-size: 8.5pt; margin: 6px 0 2px 0; font-weight: bold; }
.fc-rental p { margin: 2px 0; text-align: justify; }
.fc-rental .parties { font-size: 8pt; margin-bottom: 8px; }
.fc-rental .intro { margin-bottom: 8px; font-size: 8pt; }
.fc-rental .parties { font-size: 8pt; margin-bottom: 6px; }
.fc-rental .intro { margin-bottom: 6px; font-size: 8pt; }
.fc-rental table { width: 100%; border-collapse: collapse; }
.fc-rental table.bordered, .fc-rental table.bordered th, .fc-rental table.bordered td { border: 1px solid #000; }
.fc-rental th { background-color: #0066a1; color: white; padding: 4px 6px; font-weight: bold; font-size: 8pt; }
@@ -27,21 +27,20 @@
.fc-rental .text-right { text-align: right; }
.fc-rental .info-header { background-color: #f5f5f5; color: #333; font-weight: bold; }
/* Two-column layout for terms */
.fc-rental .terms-container { column-count: 2; column-gap: 20px; margin-top: 10px; }
.fc-rental .term-section { break-inside: avoid; margin-bottom: 8px; }
/* Two-column layout for terms (table-based for wkhtmltopdf) */
.fc-rental .terms-table { width: 100%; margin-top: 6px; }
.fc-rental .terms-table td { width: 50%; vertical-align: top; padding: 4px 12px; }
.fc-rental .term-section { margin-bottom: 5px; }
/* Credit card section - 15% taller */
/* Credit card section */
.fc-rental .cc-section { margin-top: 12px; padding: 12px; border: 2px solid #0066a1; background-color: #f8f9fa; }
.fc-rental .cc-title { font-size: 10pt; font-weight: bold; color: #0066a1; margin-bottom: 10px; text-align: center; }
.fc-rental .cc-box { border: 1px solid #000; display: inline-block; width: 21px; height: 21px; text-align: center; background: white; }
.fc-rental .authorization-text { font-size: 7pt; margin-top: 10px; font-style: italic; }
/* Signature - 40% taller */
/* Signature */
.fc-rental .signature-section { margin-top: 15px; }
.fc-rental .signature-box { border: 1px solid #000; padding: 12px; }
.fc-rental .signature-line { border-bottom: 1px solid #000; min-height: 35px; margin-bottom: 5px; }
.fc-rental .signature-label { font-size: 7pt; color: #666; }
.fc-rental .signature-label { font-size: 7pt; color: #666; text-transform: uppercase; }
.fc-rental .text-end { text-align: right; }
</style>
@@ -66,179 +65,184 @@
<p><t t-esc="company.name"/> rents to the Renter medical equipment (hospital beds, patient lifts, trapeze, over-bed tables, mobility scooters, electric wheelchairs, manual wheelchairs, stairlifts, ceiling lifts and lift chairs) subject to the terms and conditions set forth in this Rental Agreement.</p>
</div>
<!-- Terms and Conditions in Two Columns -->
<div class="terms-container">
<div class="term-section">
<h2>1. Ownership and Condition of Equipment</h2>
<p>The medical equipment is the property of <t t-esc="company.name"/> and is provided in good condition. The Renter shall return the equipment in the same condition as when received, subject to normal wear and tear. <t t-esc="company.name"/> reserves the right to inspect the equipment upon its return and may repossess it without prior notice if it is being used in violation of this agreement.</p>
</div>
<div class="term-section">
<h2>2. Cancellation Policy</h2>
<p>The Renter may cancel the order before delivery and will be charged twenty-five percent (25%) of the total rental cost. If the order is canceled during the rental period after delivery, no refund will be provided.</p>
</div>
<div class="term-section">
<h2>3. Security Deposit</h2>
<p>The security deposit will be returned after an inspection of the equipment. If the equipment has any damage, the cost of repairs will be deducted from the security deposit. If the security deposit is insufficient to cover the damages, the credit card on file will be charged for the remaining amount. Security deposit refunds may take 4 to 15 business days to process. <t t-esc="company.name"/> is not responsible for delays caused by the Renter's financial institution.</p>
</div>
<div class="term-section">
<h2>4. Liability for Loss or Damage</h2>
<p><t t-esc="company.name"/> shall not be liable for any loss of or damage to property left, lost, damaged, stolen, stored, or transported by the Renter or any other person using the medical equipment. The Renter assumes all risks associated with such loss or damage and waives any claims against <t t-esc="company.name"/>. The Renter agrees to defend, indemnify, and hold <t t-esc="company.name"/> harmless against all claims arising from such loss or damage.</p>
</div>
<div class="term-section">
<h2>5. Risk and Liability</h2>
<p>The Renter assumes all risk and liability for any loss, damage, injury, or death resulting from the use or operation of the medical equipment. <t t-esc="company.name"/> is not responsible for any acts or omissions of the Renter or the Renter's agents, servants, or employees.</p>
</div>
<div class="term-section">
<h2>6. Renter Responsibilities</h2>
<p>The Renter is responsible for the full cost of replacement for any damage, loss, theft, or destruction of the medical equipment. <t t-esc="company.name"/> may charge the Renter's credit card for repair or replacement costs as deemed necessary. The equipment must not be used by individuals under the age of 18, under the influence of intoxicants or narcotics, or in an unsafe manner.</p>
</div>
<div class="term-section">
<h2>7. Indemnification</h2>
<p>The Renter shall indemnify, defend, and hold harmless <t t-esc="company.name"/>, its agents, officers, and employees, from any claims, demands, actions, or causes of action arising from the use or operation of the medical equipment, except where caused by <t t-esc="company.name"/>'s gross negligence or willful misconduct.</p>
</div>
<div class="term-section">
<h2>8. Accident Notification</h2>
<p>The Renter must immediately notify <t t-esc="company.name"/> of any accidents, damages, or incidents involving the medical equipment.</p>
</div>
<div class="term-section">
<h2>9. Costs and Expenses</h2>
<p>The Renter agrees to cover all costs, expenses, and attorney's fees incurred by <t t-esc="company.name"/> in collecting overdue payments, recovering possession of the equipment, or enforcing claims for damage or loss.</p>
</div>
<div class="term-section">
<h2>10. Independent Status</h2>
<p>The Renter or any driver of the equipment shall not be considered an agent or employee of <t t-esc="company.name"/>.</p>
</div>
<div class="term-section">
<h2>11. Binding Obligations</h2>
<p>Any individual signing this agreement on behalf of a corporation or other entity shall be personally liable for all obligations under this agreement. This agreement is binding upon the heirs, executors, administrators, and assigns of the Renter.</p>
</div>
<div class="term-section">
<h2>12. Refusal of Service</h2>
<p><t t-esc="company.name"/> reserves the right to refuse rental to any individual or entity at its sole discretion.</p>
</div>
<div class="term-section">
<h2>13. Governing Law</h2>
<p>This Agreement shall be governed by and construed in accordance with the laws of the jurisdiction in which <t t-esc="company.name"/> operates.</p>
</div>
<div class="term-section">
<h2>14. Entire Agreement</h2>
<p>This Agreement constitutes the entire understanding between the parties concerning the rental of medical equipment and supersedes all prior agreements, representations, or understandings, whether written or oral.</p>
</div>
</div>
<!-- ============================================================ -->
<!-- PAGE 2: RENTAL DETAILS, PAYMENT, AND SIGNATURE -->
<!-- TERMS - PAGE 1 (two columns) -->
<!-- ============================================================ -->
<div style="page-break-before: always;"></div>
<h1>RENTAL DETAILS</h1>
<!-- Customer Info and Rental Period Side by Side -->
<table style="width: 100%; margin-bottom: 10px;">
<table class="terms-table" style="border: none;">
<tr>
<td style="width: 50%; vertical-align: top; padding-right: 10px;">
<table class="bordered" style="width: 100%;">
<tr>
<th colspan="2" class="info-header" style="background-color: #0066a1; color: white;">RENTER INFORMATION</th>
</tr>
<tr>
<td style="width: 35%; font-weight: bold; background-color: #f5f5f5;">Name</td>
<td><t t-esc="doc.partner_id.name"/></td>
</tr>
<tr>
<td style="font-weight: bold; background-color: #f5f5f5;">Address</td>
<td>
<div t-field="doc.partner_shipping_id"
t-options="{'widget': 'contact', 'fields': ['address'], 'no_marker': True}"/>
</td>
</tr>
<tr>
<td style="font-weight: bold; background-color: #f5f5f5;">Phone</td>
<td><t t-esc="doc.partner_id.phone or doc.partner_id.mobile or ''"/></td>
</tr>
<tr>
<td style="font-weight: bold; background-color: #f5f5f5;">Order Ref</td>
<td><t t-esc="doc.name"/></td>
</tr>
</table>
<td style="border: none;">
<div class="term-section">
<h2>1. Ownership &amp; Condition of Equipment</h2>
<p>All equipment remains the sole property of <t t-esc="company.name"/> and is provided in good, sanitized, working condition. The Renter shall not modify, alter, disassemble, relocate, or permit any third party to service or repair the equipment. The Renter shall not sublease, lend, or transfer the equipment to any other person or location without prior written consent from <t t-esc="company.name"/>. <t t-esc="company.name"/> may repossess equipment without notice if used in violation of this agreement.</p>
</div>
<div class="term-section">
<h2>2. Safe Use &amp; Renter Responsibilities</h2>
<p>The Renter shall use equipment strictly in accordance with the manufacturer's instructions, rated weight capacity, and any guidelines provided by <t t-esc="company.name"/> at the time of delivery. Equipment must only be used for its intended purpose. The Renter shall not permit use by individuals under 18, persons under the influence of alcohol or narcotics, or in any unsafe manner. The Renter must immediately notify <t t-esc="company.name"/> of any malfunction, accident, damage, or incident. Failure to report damage promptly may result in additional liability.</p>
</div>
<div class="term-section">
<h2>3. Battery Safety &amp; Maintenance</h2>
<p>For equipment with batteries (power wheelchairs, mobility scooters, patient lifts): (a) The Renter must use ONLY the charger provided by <t t-esc="company.name"/>. Use of any third-party charger is strictly prohibited and may result in equipment damage, fire hazard, and full replacement charges. (b) If the provided charger is lost or damaged, the Renter must notify <t t-esc="company.name"/> immediately and will be charged for a replacement. (c) Batteries must not be routinely discharged below 30% capacity. (d) Batteries must not be left on the charger for extended, unattended periods beyond a full charge. (e) Equipment must not be used in a manner that causes excessive battery overheating. (f) Upon return, all batteries must be charged to at least 80%. Equipment returned with batteries below 80% will incur a conditioning and service charge. (g) The Renter assumes all risk for battery misuse, including but not limited to overcharging, deep discharge, or use of unauthorized charging equipment.</p>
</div>
<div class="term-section">
<h2>4. Cleaning, Sanitation &amp; Return Condition</h2>
<p>The Renter is responsible for keeping all equipment clean and sanitary throughout the rental period. Prior to return, all equipment must be thoroughly cleaned and free of bodily fluids, stains, food residue, pet hair, and debris. <strong>Specific requirements by equipment type:</strong></p>
<p><strong>Mattresses &amp; Cushions:</strong> Mattresses must be kept clean and dry at all times. If a mattress is soiled with urine, vomit, blood, or any liquid that penetrates the cover, the mattress is deemed unrecoverable and the Renter will be charged the full replacement cost. Use of a waterproof mattress protector is strongly recommended. Wheelchair seat cushion covers must be washed (cold water, no heat drying) prior to return.</p>
<p><strong>Wheelchairs &amp; Scooters:</strong> All surfaces must be wiped clean. Any liquid spills must be cleaned immediately. Missing parts, accessories, or hardware will result in replacement charges for both the parts and any associated labour.</p>
<p><strong>Patient Lift Slings:</strong> Reusable slings must be washed before return. <t t-esc="company.name"/> does not rent hygiene slings. If a reusable sling is used for toileting or incontinence purposes, the Renter must purchase the sling at full cost and it will not be accepted for return.</p>
<p>If equipment is returned unclean, a cleaning fee will be assessed and deducted from the security deposit or charged to the card on file. If the item is deemed unrecoverable due to contamination, the full replacement cost applies. <t t-esc="company.name"/> has sole discretion in determining cleaning and replacement charges.</p>
</div>
</td>
<td style="width: 50%; vertical-align: top; padding-left: 10px;">
<table class="bordered" style="width: 100%;">
<tr>
<th colspan="2" class="info-header" style="background-color: #0066a1; color: white;">RENTAL PERIOD</th>
</tr>
<tr>
<td style="width: 40%; font-weight: bold; background-color: #f5f5f5;">Start Date</td>
<td>
<t t-if="doc.rental_start_date">
<span t-field="doc.rental_start_date" t-options="{'widget': 'date'}"/>
</t>
<t t-else=""><span style="color: #999;">Not specified</span></t>
</td>
</tr>
<tr>
<td style="font-weight: bold; background-color: #f5f5f5;">Return Date</td>
<td>
<t t-if="doc.rental_return_date">
<span t-field="doc.rental_return_date" t-options="{'widget': 'date'}"/>
</t>
<t t-else=""><span style="color: #999;">Not specified</span></t>
</td>
</tr>
<tr>
<td style="font-weight: bold; background-color: #f5f5f5;">Duration</td>
<td>
<t t-if="doc.duration_days">
<span t-esc="doc.duration_days"/> Day<t t-if="doc.duration_days != 1">s</t>
<t t-if="doc.remaining_hours and doc.remaining_hours > 0">
, <t t-esc="doc.remaining_hours"/> Hr<t t-if="doc.remaining_hours != 1">s</t>
</t>
</t>
<t t-elif="doc.rental_start_date and doc.rental_return_date"><span>Less than 1 day</span></t>
<t t-else=""><span style="color: #999;">Not specified</span></t>
</td>
</tr>
<tr>
<td style="font-weight: bold; background-color: #f5f5f5;">Total Amount</td>
<td><strong><span t-field="doc.amount_total" t-options='{"widget": "monetary", "display_currency": doc.currency_id}'/></strong></td>
</tr>
</table>
<td style="border: none;">
<div class="term-section">
<h2>5. Delivery, Installation &amp; Site Preparation</h2>
<p>Delivery, installation, and pickup fees are one-time, non-refundable charges. The Renter is responsible for ensuring the following before the technician arrives:</p>
<p>(a) <strong>Hospital Beds:</strong> The designated room must be cleared of existing furniture to allow adequate space for installation. There must be sufficient clearance for the bed frame, side rails, and technician access on all sides. (b) <strong>All Equipment:</strong> Walkways and entry paths must be clear of obstacles, ice, snow, and tripping hazards. Pets must be secured in a separate room during delivery and pickup. (c) There must be adequate doorway width and turning space for the equipment to pass through.</p>
<p>If the technician is unable to complete delivery or pickup due to site conditions not meeting these requirements, the visit will be rescheduled and the Renter will be charged fifty percent (50%) of the original delivery fee for each additional visit.</p>
</div>
<div class="term-section">
<h2>6. Pickup &amp; Return</h2>
<p>Upon cancellation or end of rental, <t t-esc="company.name"/> will schedule equipment pickup. The Renter must make all equipment and accessories available at the scheduled time. If the Renter denies or is unavailable for a scheduled pickup, a rebooking fee of fifty percent (50%) of the delivery fee will be charged for each subsequent visit. The Renter must ensure there is adequate room and clear pathways for safe removal of the equipment.</p>
</div>
<div class="term-section">
<h2>7. Return Inspection</h2>
<p>A technician will inspect equipment on-site at pickup for damage, cleanliness, completeness (including all accessories, chargers, remotes, rails, and hardware), and battery charge level. If the equipment is in good condition, the deposit refund process begins. If damage, missing parts, contamination, or unsanitary conditions are identified, the order is flagged for internal review, the Renter is notified, and the deposit is held until the matter is resolved. Both parts and labour will be charged for any missing or damaged components.</p>
</div>
<div class="term-section">
<h2>8. Security Deposit</h2>
<p>A refundable security deposit is collected at the start of the rental. After return and inspection, the deposit is held for a review period (typically three business days). If the equipment is returned in good, clean condition with all accessories, the full deposit is refunded to the original card. Deductions may be applied for: damage, excessive wear, missing parts, cleaning charges, battery conditioning, and replacement costs. If total charges exceed the deposit, the remaining balance is charged to the card on file and an invoice is issued. Deposit refunds take 1 to 3 business days to process; bank posting times may vary. <t t-esc="company.name"/> is not responsible for delays by the Renter's financial institution.</p>
</div>
<div class="term-section">
<h2>9. Automatic Renewal &amp; Recurring Payments</h2>
<p>This rental renews automatically at the end of each rental period for the same duration and rate unless the Renter cancels. The card on file will be charged automatically on each renewal date. A renewal reminder will be sent prior to the renewal date; the timing is proportional to the rental period (e.g. approximately three days before a 30-day rental, or same-day for a short-term rental). To cancel, the Renter must submit a cancellation request before the renewal date. Cancellation requests received on or after the renewal date will not be processed until the following cycle. For short-term rentals (typically under three days), a grace period applies: the auto-renewal charge is deferred for a brief window after the scheduled return time, allowing the Renter to return the equipment without incurring an additional renewal charge. If the equipment is not returned within the grace period, the renewal is processed automatically.</p>
</div>
<div class="term-section">
<h2>10. Cancellation &amp; Early Return</h2>
<p>The Renter may cancel before delivery with a 25% restocking fee. Once delivered, the rental charge for the current period is non-refundable. To stop future renewals, the Renter must cancel at least one (1) day before the next renewal date. Upon cancellation, equipment pickup will be scheduled by <t t-esc="company.name"/>.</p>
</div>
</td>
</tr>
</table>
<!-- ============================================================ -->
<!-- TERMS - PAGE 2 (two columns, continued) -->
<!-- ============================================================ -->
<div style="page-break-before: always;"></div>
<h1>RENTAL AGREEMENT <span style="font-size: 10pt;">(continued)</span></h1>
<table class="terms-table" style="border: none;">
<tr>
<td style="border: none;">
<div class="term-section">
<h2>11. Card on File &amp; Payment Authorization</h2>
<p>By signing this agreement, the Renter authorizes <t t-esc="company.name"/> to securely store payment card details using industry-standard tokenization. The card on file will be used for: initial rental charges, security deposit collection, automatic renewal payments, damage charges, cleaning fees, missing parts charges, battery conditioning fees, rebooking fees, overage invoices, and deposit refunds. <t t-esc="company.name"/> does not store full card numbers. All card data is purged upon rental completion.</p>
</div>
<div class="term-section">
<h2>12. Liability, Risk &amp; Medical Disclaimer</h2>
<p>The Renter assumes all risk and liability for any loss, damage, injury, illness, or death arising from the use, storage, or possession of the equipment. The equipment is provided as a mobility or comfort aid only and is <strong>NOT a medical device</strong>, nor a substitute for professional medical advice, diagnosis, or treatment. <t t-esc="company.name"/> makes no representations or warranties regarding the equipment's suitability for any specific medical condition. The Renter confirms they have independently assessed the equipment's suitability for their needs or the needs of the intended user. <t t-esc="company.name"/> is not liable for any property left, stored, or transported with the equipment, nor for any indirect, incidental, special, or consequential damages of any kind. The Renter is responsible for the full replacement cost of any equipment that is damaged, lost, stolen, or destroyed.</p>
</div>
<div class="term-section">
<h2>13. Indemnification</h2>
<p>The Renter shall indemnify, defend, and hold harmless <t t-esc="company.name"/>, its owners, directors, agents, officers, employees, contractors, and technicians from any and all claims, demands, liabilities, damages, injuries, losses, and expenses (including legal fees and court costs) arising from the Renter's use, possession, maintenance, or return of the equipment, or from any third party's use of the equipment while in the Renter's possession, except where caused solely by <t t-esc="company.name"/>'s gross negligence.</p>
</div>
<div class="term-section">
<h2>14. Purchase Option</h2>
<p>During the rental period, <t t-esc="company.name"/> may offer the Renter an option to purchase the rented or equivalent new equipment at a discounted price. If accepted, the purchase is subject to internal approval by <t t-esc="company.name"/>. The security deposit is always refunded in full and is never applied toward the purchase price. Delivery of the purchased item and pickup of the rental equipment will be coordinated by <t t-esc="company.name"/>.</p>
</div>
</td>
<td style="border: none;">
<div class="term-section">
<h2>15. Communication Consent</h2>
<p>The Renter consents to receive automated communications from <t t-esc="company.name"/> related to this rental, including but not limited to: renewal reminders, payment confirmations, invoices, delivery and pickup notifications, inspection results, deposit status updates, and promotional offers, via email and SMS to the contact information on file.</p>
</div>
<div class="term-section">
<h2>16. Costs &amp; Expenses</h2>
<p>The Renter agrees to cover all costs, expenses, and legal fees incurred by <t t-esc="company.name"/> in collecting overdue payments, recovering equipment, enforcing claims for damage, loss, or contamination, or otherwise enforcing the terms of this agreement.</p>
</div>
<div class="term-section">
<h2>17. General Provisions</h2>
<p>The Renter is not an agent or employee of <t t-esc="company.name"/>. Any individual signing this agreement on behalf of a corporation, trust, or other entity shall be personally liable for all obligations under this agreement. This agreement is binding upon the heirs, executors, administrators, and assigns of the Renter. <t t-esc="company.name"/> reserves the right to refuse rental to any individual or entity at its sole discretion. <t t-esc="company.name"/> shall not be liable for any delays or failures in performance caused by events beyond its reasonable control, including but not limited to natural disasters, pandemics, supplier delays, or government orders. If any provision of this agreement is found to be unenforceable, the remaining provisions shall remain in full force and effect. This Agreement is governed by and construed in accordance with the laws of the Province of Ontario, Canada, and constitutes the entire understanding between the parties, superseding all prior agreements, representations, or understandings, whether written or oral.</p>
</div>
</td>
</tr>
</table>
<!-- ============================================================ -->
<!-- PAGE 3: RENTAL DETAILS, PAYMENT, AND SIGNATURE -->
<!-- ============================================================ -->
<div style="page-break-before: always;"></div>
<h1>RENTAL DETAILS</h1>
<!-- Renter &amp; Rental Info - Two Column Table with Rows -->
<table class="bordered" style="margin-bottom: 10px;">
<thead>
<tr>
<th style="width: 18%;">FIELD</th>
<th style="width: 32%;">DETAILS</th>
<th style="width: 18%;">FIELD</th>
<th style="width: 32%;">DETAILS</th>
</tr>
</thead>
<tbody>
<tr>
<td style="font-weight: bold; background-color: #f5f5f5;">Name</td>
<td><t t-esc="doc.partner_id.name"/></td>
<td style="font-weight: bold; background-color: #f5f5f5;">Order Ref</td>
<td><t t-esc="doc.name"/></td>
</tr>
<tr>
<td style="font-weight: bold; background-color: #f5f5f5;">Phone</td>
<td><t t-esc="doc.partner_id.phone or doc.partner_id.mobile or ''"/></td>
<td style="font-weight: bold; background-color: #f5f5f5;">Start Date</td>
<td>
<t t-if="doc.rental_start_date"><span t-field="doc.rental_start_date" t-options="{'widget': 'date'}"/></t>
<t t-else="">-</t>
</td>
</tr>
<tr>
<td style="font-weight: bold; background-color: #f5f5f5;">Address</td>
<td>
<div t-field="doc.partner_shipping_id"
t-options="{'widget': 'contact', 'fields': ['address'], 'no_marker': True}"/>
</td>
<td style="font-weight: bold; background-color: #f5f5f5;">Return Date</td>
<td>
<t t-if="doc.rental_return_date"><span t-field="doc.rental_return_date" t-options="{'widget': 'date'}"/></t>
<t t-else="">-</t>
</td>
</tr>
<tr>
<td style="font-weight: bold; background-color: #f5f5f5;"></td>
<td></td>
<td style="font-weight: bold; background-color: #f5f5f5;">Duration</td>
<td>
<t t-if="doc.duration_days">
<span t-esc="doc.duration_days"/> Day<t t-if="doc.duration_days != 1">s</t>
<t t-if="doc.remaining_hours and doc.remaining_hours > 0">
, <t t-esc="doc.remaining_hours"/> Hr<t t-if="doc.remaining_hours != 1">s</t>
</t>
</t>
<t t-elif="doc.rental_start_date and doc.rental_return_date">Less than 1 day</t>
<t t-else="">-</t>
</td>
</tr>
</tbody>
</table>
<!-- Equipment / Order Lines Table -->
<table class="bordered" style="margin-bottom: 10px;">
<thead>
<tr>
<th style="width: 35%;">DESCRIPTION</th>
<th class="text-center" style="width: 8%;">QTY</th>
<th class="text-right" style="width: 17%;">UNIT PRICE</th>
<th class="text-right" style="width: 20%;">TAXES</th>
<th class="text-right" style="width: 20%;">TOTAL</th>
<th style="width: 48%;">DESCRIPTION</th>
<th class="text-center" style="width: 7%;">QTY</th>
<th class="text-right" style="width: 15%;">UNIT PRICE</th>
<th class="text-right" style="width: 15%;">TAXES</th>
<th class="text-right" style="width: 15%;">TOTAL</th>
</tr>
</thead>
<tbody>
<t t-set="has_taxes" t-value="False"/>
<t t-foreach="doc.order_line" t-as="line">
<t t-if="not line.display_type">
<t t-if="line.tax_ids" t-set="has_taxes" t-value="True"/>
<tr>
<td>
<t t-esc="line.product_id.name"/>
@@ -265,8 +269,8 @@
</t>
</tbody>
</table>
<!-- Totals - right-aligned bordered table (matching ADP style) -->
<!-- Totals - right-aligned bordered table -->
<div style="text-align: right; margin-bottom: 10px;">
<table class="bordered" style="width: auto; margin-left: auto;">
<tr>
@@ -283,99 +287,98 @@
</tr>
</table>
</div>
<!-- Credit Card Authorization - Compact -->
<!-- Credit Card Authorization - outer border only, row lines inside -->
<t t-set="deposit_lines" t-value="doc.order_line.filtered(lambda l: l.is_security_deposit)"/>
<t t-set="rental_charge_total" t-value="doc.amount_total - sum(deposit_lines.mapped('price_total'))"/>
<div class="cc-section">
<div class="cc-title">CREDIT CARD PAYMENT AUTHORIZATION</div>
<table style="width: 100%; border: none;">
<table style="width: 100%; border-collapse: collapse;">
<tr>
<td style="width: 20%; padding: 5px 4px; border: none;"><strong>Card #:</strong></td>
<td style="padding: 5px 4px; border: none;">
<t t-if="doc.rental_payment_token_id">
<span style="font-size: 14px;">**** **** **** <t t-out="doc._get_card_last_four() or '****'">1234</t></span>
<td style="width: 18%; padding: 6px 8px; border: none; border-bottom: 1px solid #ccc;"><strong>Card #:</strong></td>
<td style="padding: 6px 8px; border: none; border-bottom: 1px solid #ccc;">
<span style="font-size: 12px; letter-spacing: 1px;">**** **** **** <t t-out="doc._get_card_last_four() or '____'">1234</t></span>
</td>
</tr>
<tr>
<td style="padding: 6px 8px; border: none; border-bottom: 1px solid #ccc;"><strong>Exp Date:</strong></td>
<td style="padding: 6px 8px; border: none; border-bottom: 1px solid #ccc;">
<span style="font-size: 12px;">**/**</span>
<span style="margin-left: 25px;"><strong>CVV:</strong> ***</span>
</td>
</tr>
<tr>
<td style="padding: 6px 8px; border: none; border-bottom: 1px solid #ccc;"><strong>Cardholder:</strong></td>
<td style="padding: 6px 8px; border: none; border-bottom: 1px solid #ccc;">
<t t-if="doc.rental_agreement_signer_name">
<span t-out="doc.rental_agreement_signer_name">Name</span>
</t>
<t t-else="">
<span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span>
<span style="margin: 0 3px;">-</span>
<span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span>
<span style="margin: 0 3px;">-</span>
<span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span>
<span style="margin: 0 3px;">-</span>
<span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span>
<span style="color: #999;">_________________________________</span>
</t>
</td>
</tr>
<tr>
<td style="padding: 5px 4px; border: none;"><strong>Exp Date:</strong></td>
<td style="padding: 5px 4px; border: none;">
<span class="cc-box"></span><span class="cc-box"></span>
<span style="margin: 0 2px;">/</span>
<span class="cc-box"></span><span class="cc-box"></span>
<span style="margin-left: 20px;"><strong>CVV:</strong></span>
<span>***</span>
<t t-set="deposit_lines" t-value="doc.order_line.filtered(lambda l: l.is_security_deposit)"/>
<span style="margin-left: 20px;"><strong>Security Deposit:</strong>
<td style="padding: 6px 8px; border: none; border-bottom: 1px solid #ccc;"><strong>Billing Address:</strong></td>
<td style="padding: 6px 8px; border: none; border-bottom: 1px solid #ccc;">
<t t-if="doc.rental_billing_address">
<span t-out="doc.rental_billing_address">Address</span>
<t t-if="doc.rental_billing_postal_code">, <span t-out="doc.rental_billing_postal_code">Postal</span></t>
</t>
<t t-else="">
<span style="color: #999;">_________________________________</span>
</t>
</td>
</tr>
<tr>
<td style="padding: 6px 8px; border: none;"><strong>Rental Charges:</strong></td>
<td style="padding: 6px 8px; border: none;">
$<t t-out="'%.2f' % rental_charge_total">0.00</t>
<span style="margin-left: 40px;"><strong>Security Deposit:</strong>
<t t-if="deposit_lines">
$<t t-out="'%.2f' % sum(deposit_lines.mapped('price_unit'))">0.00</t>
$<t t-out="'%.2f' % sum(deposit_lines.mapped('price_total'))">0.00</t>
</t>
<t t-else="">$___________</t>
</span>
</td>
</tr>
</table>
<div class="authorization-text">
<p>I authorize <t t-esc="company.name"/> to charge the credit card indicated above for: (a) the initial rental charges and security deposit; (b) automatic recurring renewal payments on each renewal date until I cancel; (c) any damage, loss, or overage charges as described in the terms above; and (d) to process refunds to this card. I certify that I am an authorized user of this credit card and will not dispute legitimate charges. By signing this form, I acknowledge that I have read and agree to all terms and conditions of this Rental Agreement, including the automatic renewal, cancellation, security deposit, inspection, and communication provisions.</p>
</div>
</div>
<!-- Signature Section - outer border only, three equal columns -->
<div class="signature-section">
<table style="width: 100%; border: 1px solid #000; border-collapse: collapse;">
<tr>
<td style="padding: 5px 4px; border: none;"><strong>Cardholder:</strong></td>
<td style="padding: 5px 4px; border: none;">
<td style="width: 33.33%; padding: 10px 14px; border: none; height: 80px; vertical-align: top;">
<div class="signature-label">FULL NAME (PRINT)</div>
<t t-if="doc.rental_agreement_signer_name">
<span t-out="doc.rental_agreement_signer_name">Name</span>
</t>
<t t-else="">
<div style="border-bottom: 1px solid #000; min-height: 18px; width: 100%;"></div>
<div style="min-height: 50px; font-size: 14px; padding-top: 8px;" t-out="doc.rental_agreement_signer_name">Name</div>
</t>
<t t-else=""><div style="border-bottom: 1px solid #000; min-height: 50px; margin-top: 20px;"></div></t>
</td>
</tr>
<tr>
<td colspan="2" style="padding: 5px 4px; border: none;">
<strong>Billing Address (if different):</strong>
<div style="border-bottom: 1px solid #000; min-height: 18px; width: 100%; margin-top: 4px;"></div>
<td style="width: 33.33%; padding: 10px 14px; border: none; border-left: 1px solid #ccc; border-right: 1px solid #ccc; height: 80px; vertical-align: top;">
<div class="signature-label">SIGNATURE</div>
<t t-if="doc.rental_agreement_signature">
<div style="min-height: 50px; padding-top: 8px;">
<img t-att-src="'data:image/png;base64,' + doc.rental_agreement_signature.decode('utf-8') if doc.rental_agreement_signature else ''" style="max-height: 55px; max-width: 100%;"/>
</div>
</t>
<t t-else=""><div style="border-bottom: 1px solid #000; min-height: 50px; margin-top: 20px;"></div></t>
</td>
<td style="width: 33.34%; padding: 10px 14px; border: none; height: 80px; vertical-align: top;">
<div class="signature-label">DATE</div>
<t t-if="doc.rental_agreement_signed_date">
<div style="min-height: 50px; font-size: 14px; padding-top: 8px;" t-out="doc.rental_agreement_signed_date.strftime('%m/%d/%Y')">Date</div>
</t>
<t t-else=""><div style="border-bottom: 1px solid #000; min-height: 50px; margin-top: 20px;"></div></t>
</td>
</tr>
</table>
<div class="authorization-text">
<p>I authorize <t t-esc="company.name"/> to charge the credit card indicated in this authorization form according to the terms outlined above. I certify that I am an authorized user of this credit card and will not dispute the payment. By signing this form, I acknowledge that I have read the rental agreement and understand the terms and conditions. I understand that if the rented item is not returned on the agreed return date, additional charges will be incurred. *Payments for monthly rental items will be charged on the re-rental date until the item is returned.</p>
</div>
</div>
<!-- Signature Section - Compact -->
<div class="signature-section">
<div class="signature-box">
<table style="width: 100%; border: none;">
<tr>
<td style="width: 40%; padding: 5px; border: none;">
<div class="signature-label">FULL NAME (PRINT)</div>
<t t-if="doc.rental_agreement_signer_name">
<div style="min-height: 18px; font-size: 14px;" t-out="doc.rental_agreement_signer_name">Name</div>
</t>
<t t-else=""><div class="signature-line"></div></t>
</td>
<td style="width: 40%; padding: 5px; border: none;">
<div class="signature-label">SIGNATURE</div>
<t t-if="doc.rental_agreement_signature">
<img t-att-src="'data:image/png;base64,' + doc.rental_agreement_signature.decode('utf-8') if doc.rental_agreement_signature else ''" style="max-height: 50px; max-width: 100%;"/>
</t>
<t t-else=""><div class="signature-line"></div></t>
</td>
<td style="width: 20%; padding: 5px; border: none;">
<div class="signature-label">DATE</div>
<t t-if="doc.rental_agreement_signed_date">
<div style="min-height: 18px; font-size: 14px;" t-out="doc.rental_agreement_signed_date.strftime('%m/%d/%Y')">Date</div>
</t>
<t t-else=""><div class="signature-line"></div></t>
</td>
</tr>
</table>
</div>
</div>
</div>
@@ -392,7 +395,7 @@
<field name="report_type">qweb-pdf</field>
<field name="report_name">fusion_rental.report_rental_agreement</field>
<field name="report_file">fusion_rental.report_rental_agreement</field>
<field name="print_report_name">'Rental Agreement - %s' % object.name</field>
<field name="print_report_name">'Rental Agreement - %s%s' % (object.name, ' - Signed' if object.rental_agreement_signed else '')</field>
<field name="binding_model_id" ref="sale.model_sale_order"/>
<field name="binding_type">report</field>
</record>