Initial commit
This commit is contained in:
362
fusion_payroll/reports/payroll_cheque_report.xml
Normal file
362
fusion_payroll/reports/payroll_cheque_report.xml
Normal file
@@ -0,0 +1,362 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Paper Format for Cheque (Letter size - matches pre-printed cheque stock) -->
|
||||
<record id="paperformat_cheque" model="report.paperformat">
|
||||
<field name="name">Payroll Cheque</field>
|
||||
<field name="default" eval="False"/>
|
||||
<field name="format">Letter</field>
|
||||
<field name="orientation">Portrait</field>
|
||||
<field name="margin_top">0</field>
|
||||
<field name="margin_bottom">0</field>
|
||||
<field name="margin_left">0</field>
|
||||
<field name="margin_right">0</field>
|
||||
<field name="header_line" eval="False"/>
|
||||
<field name="header_spacing">0</field>
|
||||
<field name="dpi">96</field>
|
||||
</record>
|
||||
|
||||
<record id="action_report_payroll_cheque" model="ir.actions.report">
|
||||
<field name="name">Payroll Cheque</field>
|
||||
<field name="model">payroll.cheque</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">fusion_payroll.report_payroll_cheque</field>
|
||||
<field name="report_file">fusion_payroll.report_payroll_cheque</field>
|
||||
<field name="print_report_name">'Cheque-%s-%s' % (object.cheque_number or 'Draft', object.employee_id.name)</field>
|
||||
<field name="binding_model_id" ref="model_payroll_cheque"/>
|
||||
<field name="binding_type">report</field>
|
||||
<field name="paperformat_id" ref="paperformat_cheque"/>
|
||||
</record>
|
||||
|
||||
<!-- Main Cheque Report Template -->
|
||||
<template id="report_payroll_cheque">
|
||||
<t t-call="web.html_container">
|
||||
<style>
|
||||
/* Force full page width - override ALL Bootstrap container constraints */
|
||||
body.container, body.container-fluid, .container, .container-fluid,
|
||||
#wrapwrap, main {
|
||||
max-width: 100% !important;
|
||||
width: 100% !important;
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<t t-foreach="docs" t-as="cheque">
|
||||
<t t-set="layout" t-value="env['cheque.layout.settings'].sudo().get_default_settings()"/>
|
||||
<t t-set="stub_data" t-value="cheque.get_pay_stub_data()"/>
|
||||
<t t-call="fusion_payroll.report_payroll_cheque_page"/>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- Cheque Page Layout -->
|
||||
<template id="report_payroll_cheque_page">
|
||||
<!-- Main page container - 8.5in wide, centered -->
|
||||
<div style="font-family: Arial, sans-serif; width: 8.5in; height: 11in; position: relative; margin: 0 auto; padding: 0; box-sizing: border-box;">
|
||||
|
||||
<!-- ======================= SECTION 1: CHEQUE (Top 3.67 inches) ======================= -->
|
||||
<div t-attf-style="position: absolute; top: 0; left: 0; width: 100%; height: #{layout.section1_height}in; box-sizing: border-box;">
|
||||
|
||||
<!-- Date - Single Line with Label -->
|
||||
<div t-attf-style="position: absolute; right: 0.8in; top: #{layout.date_y}in; white-space: nowrap;">
|
||||
<span t-attf-style="font-size: #{layout.date_font_size}pt; font-weight: bold; font-family: 'Courier New', monospace;">
|
||||
DATE: <t t-esc="cheque.cheque_date.strftime('%b %d, %Y').upper() if cheque.cheque_date else ''"/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Amount (numeric) -->
|
||||
<div t-attf-style="position: absolute; right: 0.6in; top: #{layout.amount_y}in; white-space: nowrap;">
|
||||
<span t-attf-style="font-size: #{layout.amount_font_size}pt; font-weight: bold; font-family: 'Courier New', monospace;">
|
||||
**<t t-esc="'{:,.2f}'.format(cheque.amount)"/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Amount in Words -->
|
||||
<div t-attf-style="position: absolute; left: #{layout.amount_words_x}in; top: #{layout.amount_words_y}in; right: 2in; white-space: nowrap; overflow: hidden;">
|
||||
<span t-attf-style="font-size: #{layout.amount_words_font_size}pt; font-family: 'Courier New', monospace;">
|
||||
*****<t t-esc="cheque.amount_in_words"/>*****
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Payee Name -->
|
||||
<div t-attf-style="position: absolute; left: #{layout.payee_x}in; top: #{layout.payee_y}in; white-space: nowrap;">
|
||||
<span t-attf-style="font-size: #{layout.payee_font_size}pt; font-weight: bold;">
|
||||
<t t-esc="cheque.payee_name"/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Payee Address -->
|
||||
<div t-attf-style="position: absolute; left: #{layout.payee_address_x}in; top: #{layout.payee_address_y}in; width: 4in;">
|
||||
<span t-attf-style="font-size: #{layout.payee_address_font_size}pt; color: #333;">
|
||||
<t t-esc="(cheque.payee_address or '').replace(chr(10), ', ')"/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Pay Period -->
|
||||
<div t-attf-style="position: absolute; left: #{layout.cheque_pay_period_x}in; top: #{layout.cheque_pay_period_y}in; white-space: nowrap;">
|
||||
<span style="font-size: 9pt;">
|
||||
<b>Pay Period:</b> <t t-esc="cheque.pay_period_display"/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Memo (if any) -->
|
||||
<div t-if="cheque.memo" t-attf-style="position: absolute; left: #{layout.memo_x}in; top: #{layout.memo_y}in;">
|
||||
<span t-attf-style="font-size: #{layout.memo_font_size}pt; color: #666;">
|
||||
<t t-esc="cheque.memo"/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- ======================= SECTION 2: PAY STUB 1 (Middle) ======================= -->
|
||||
<!-- Full width stub - uses layout settings for padding to control margins -->
|
||||
<div t-attf-style="position: absolute; top: #{layout.section2_start}in; left: 0; width: 8.5in; height: #{layout.section2_height}in; overflow: hidden; padding-left: #{layout.stub_padding_left}in; padding-right: #{layout.stub_padding_right}in; padding-top: #{layout.stub_padding_top}in; box-sizing: border-box;">
|
||||
<t t-call="fusion_payroll.report_cheque_stub_redesigned"/>
|
||||
</div>
|
||||
|
||||
<!-- ======================= SECTION 3: PAY STUB 2 (Bottom) ======================= -->
|
||||
<!-- Full width stub - uses layout settings for padding to control margins -->
|
||||
<div t-attf-style="position: absolute; top: #{layout.section3_start}in; left: 0; width: 8.5in; height: #{layout.section3_height}in; overflow: hidden; padding-left: #{layout.stub_padding_left}in; padding-right: #{layout.stub_padding_right}in; padding-top: #{layout.stub_padding_top}in; box-sizing: border-box;">
|
||||
<t t-call="fusion_payroll.report_cheque_stub_redesigned"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- ======================= REDESIGNED PAY STUB CONTENT ======================= -->
|
||||
<template id="report_cheque_stub_redesigned">
|
||||
<!-- Main stub table - full width, reduced padding for maximum width usage -->
|
||||
<table style="width: 100%; border-collapse: collapse; font-family: Arial, sans-serif; table-layout: fixed;">
|
||||
<tr>
|
||||
<!-- LEFT COLUMN: Employee & Company Info -->
|
||||
<td style="width: 22%; vertical-align: top; padding: 0 8px 0 5px; border-right: 1px solid #ccc;">
|
||||
<!-- Employee Name -->
|
||||
<div style="font-weight: bold; font-size: 11pt; margin-bottom: 2px;">
|
||||
<t t-esc="cheque.payee_name"/>
|
||||
</div>
|
||||
<div style="font-size: 8pt; color: #444; line-height: 1.2; margin-bottom: 6px;">
|
||||
<t t-esc="cheque.payee_address or ''"/>
|
||||
</div>
|
||||
|
||||
<!-- Company Info -->
|
||||
<div style="font-weight: bold; font-size: 9pt; margin-top: 4px;">
|
||||
<t t-esc="cheque.company_id.name"/>
|
||||
</div>
|
||||
<div style="font-size: 7pt; color: #555; line-height: 1.2;">
|
||||
<t t-if="cheque.company_id.street"><t t-esc="cheque.company_id.street"/><br/></t>
|
||||
<t t-esc="cheque.company_id.city or ''"/><t t-if="cheque.company_id.state_id">, <t t-esc="cheque.company_id.state_id.code"/></t>
|
||||
<t t-if="cheque.company_id.zip"> <t t-esc="cheque.company_id.zip"/></t>
|
||||
</div>
|
||||
|
||||
<!-- Pay Period -->
|
||||
<div style="margin-top: 6px;">
|
||||
<div style="font-size: 7pt; color: #888; font-weight: bold;">PAY PERIOD</div>
|
||||
<div style="font-size: 8pt;"><t t-esc="cheque.pay_period_display"/></div>
|
||||
</div>
|
||||
|
||||
<!-- Pay Date -->
|
||||
<div style="margin-top: 3px;">
|
||||
<div style="font-size: 7pt; color: #888; font-weight: bold;">PAY DATE</div>
|
||||
<div style="font-size: 8pt;"><t t-esc="cheque.cheque_date.strftime('%m/%d/%Y') if cheque.cheque_date else ''"/></div>
|
||||
</div>
|
||||
|
||||
<!-- Cheque Number -->
|
||||
<div t-if="cheque.cheque_number" style="margin-top: 3px;">
|
||||
<div style="font-size: 7pt; color: #888; font-weight: bold;">CHEQUE #</div>
|
||||
<div style="font-size: 8pt; font-weight: bold;"><t t-esc="cheque.cheque_number"/></div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- MIDDLE COLUMN: PAY Details -->
|
||||
<td style="width: 26%; vertical-align: top; padding: 0 12px; border-right: 1px solid #ccc;">
|
||||
<!-- PAY Section -->
|
||||
<div style="font-weight: bold; font-size: 9pt; border-bottom: 1.5px solid #333; padding-bottom: 3px; margin-bottom: 5px;">
|
||||
PAY
|
||||
</div>
|
||||
<table style="width: 100%; font-size: 8pt; border-collapse: separate; border-spacing: 0 3px;">
|
||||
<tr style="color: #666; font-size: 7pt;">
|
||||
<td></td>
|
||||
<td style="text-align: right; padding: 2px 4px;">Hrs</td>
|
||||
<td style="text-align: right; padding: 2px 4px;">Rate</td>
|
||||
<td style="text-align: right; padding: 2px 4px;">Current</td>
|
||||
<td style="text-align: right; padding: 2px 4px;">YTD</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px 0;">Regular</td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:.2f}'.format(stub_data.get('pay',{}).get('regular_pay',{}).get('hours',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:.2f}'.format(stub_data.get('pay',{}).get('regular_pay',{}).get('rate',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('pay',{}).get('regular_pay',{}).get('current',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('pay',{}).get('regular_pay',{}).get('ytd',0))"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px 0;">Vacation</td>
|
||||
<td style="text-align: right; padding: 2px 4px;">-</td>
|
||||
<td style="text-align: right; padding: 2px 4px;">-</td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('pay',{}).get('vacation_pay',{}).get('current',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('pay',{}).get('vacation_pay',{}).get('ytd',0))"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px 0;">Stat Holiday</td>
|
||||
<td style="text-align: right; padding: 2px 4px;">-</td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:.2f}'.format(stub_data.get('pay',{}).get('stat_holiday_pay',{}).get('rate',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('pay',{}).get('stat_holiday_pay',{}).get('current',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('pay',{}).get('stat_holiday_pay',{}).get('ytd',0))"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Gross Pay Total -->
|
||||
<div style="text-align: right; font-size: 8pt; font-weight: bold; margin-top: 5px; padding-top: 4px; border-top: 1px solid #ccc;">
|
||||
Gross: $<t t-esc="'{:,.2f}'.format(stub_data.get('summary',{}).get('total_pay',{}).get('current',0))"/>
|
||||
</div>
|
||||
|
||||
<!-- OTHER PAY Section -->
|
||||
<div style="font-weight: bold; font-size: 8pt; border-bottom: 1px solid #999; margin-top: 8px; padding-bottom: 2px; margin-bottom: 4px;">
|
||||
OTHER PAY
|
||||
</div>
|
||||
<table style="width: 100%; font-size: 7pt; color: #666;">
|
||||
<tr><td colspan="3" style="padding: 2px; text-align: center;">-</td></tr>
|
||||
</table>
|
||||
|
||||
<!-- BENEFITS Section -->
|
||||
<div style="font-weight: bold; font-size: 8pt; border-bottom: 1px solid #999; margin-top: 8px; padding-bottom: 2px; margin-bottom: 4px;">
|
||||
BENEFITS
|
||||
</div>
|
||||
<table style="width: 100%; font-size: 7pt; border-collapse: separate; border-spacing: 0 2px;">
|
||||
<tr style="color: #666; font-size: 6pt;">
|
||||
<td></td>
|
||||
<td style="text-align: right; padding: 2px 4px;">Accrued</td>
|
||||
<td style="text-align: right; padding: 2px 4px;">Used</td>
|
||||
<td style="text-align: right; padding: 2px 4px;">Avail</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px 0;">Vacation</td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:.2f}'.format(stub_data.get('benefits',{}).get('vacation',{}).get('accrued',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:.2f}'.format(stub_data.get('benefits',{}).get('vacation',{}).get('used',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:.2f}'.format(stub_data.get('benefits',{}).get('vacation',{}).get('available',0))"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<!-- THIRD COLUMN: TAXES & DEDUCTIONS -->
|
||||
<td style="width: 26%; vertical-align: top; padding: 0 12px; border-right: 1px solid #ccc;">
|
||||
<!-- TAXES Section -->
|
||||
<div style="font-weight: bold; font-size: 9pt; border-bottom: 1.5px solid #333; padding-bottom: 3px; margin-bottom: 5px;">
|
||||
TAXES
|
||||
</div>
|
||||
<table style="width: 100%; font-size: 8pt; border-collapse: separate; border-spacing: 0 3px;">
|
||||
<tr style="color: #666; font-size: 7pt;">
|
||||
<td></td>
|
||||
<td style="text-align: right; padding: 2px 4px;">Current</td>
|
||||
<td style="text-align: right; padding: 2px 4px;">YTD</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px 0;">Income Tax</td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('taxes',{}).get('income_tax',{}).get('current',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('taxes',{}).get('income_tax',{}).get('ytd',0))"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px 0;">EI</td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('taxes',{}).get('ei',{}).get('current',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('taxes',{}).get('ei',{}).get('ytd',0))"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px 0;">CPP</td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('taxes',{}).get('cpp',{}).get('current',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('taxes',{}).get('cpp',{}).get('ytd',0))"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px 0;">CPP2</td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('taxes',{}).get('cpp2',{}).get('current',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('taxes',{}).get('cpp2',{}).get('ytd',0))"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Total Taxes -->
|
||||
<div style="text-align: right; font-size: 8pt; font-weight: bold; margin-top: 5px; padding-top: 4px; border-top: 1px solid #ccc;">
|
||||
Total: $<t t-esc="'{:,.2f}'.format(stub_data.get('summary',{}).get('taxes',{}).get('current',0))"/>
|
||||
</div>
|
||||
|
||||
<!-- DEDUCTIONS Section -->
|
||||
<div style="font-weight: bold; font-size: 8pt; border-bottom: 1px solid #999; margin-top: 8px; padding-bottom: 2px; margin-bottom: 4px;">
|
||||
DEDUCTIONS
|
||||
</div>
|
||||
<table style="width: 100%; font-size: 7pt; color: #666;">
|
||||
<tr><td colspan="3" style="padding: 2px; text-align: center;">-</td></tr>
|
||||
</table>
|
||||
|
||||
<!-- EMPLOYER CONTRIBUTIONS Section -->
|
||||
<div style="font-weight: bold; font-size: 8pt; border-bottom: 1px solid #999; margin-top: 8px; padding-bottom: 2px; margin-bottom: 4px; color: #0066cc;">
|
||||
EMPLOYER CONTRIBUTIONS
|
||||
</div>
|
||||
<table style="width: 100%; font-size: 7pt; border-collapse: separate; border-spacing: 0 2px;">
|
||||
<tr>
|
||||
<td style="padding: 2px 0;">EI (1.4x)</td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('employer',{}).get('ei',{}).get('current',0))"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px 0;">CPP</td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('employer',{}).get('cpp',{}).get('current',0))"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px 0;">CPP2</td>
|
||||
<td style="text-align: right; padding: 2px 4px;"><t t-esc="'{:,.2f}'.format(stub_data.get('employer',{}).get('cpp2',{}).get('current',0))"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<!-- RIGHT COLUMN: SUMMARY -->
|
||||
<td style="width: 26%; vertical-align: top; padding: 0 5px 0 8px;">
|
||||
<!-- Summary Box -->
|
||||
<table style="width: 100%; border: 2px solid #333; border-collapse: collapse; font-size: 8pt;">
|
||||
<tr style="background: #f0f0f0; border-bottom: 1px solid #333;">
|
||||
<td style="padding: 3px 5px; font-weight: bold; font-size: 9pt;">SUMMARY</td>
|
||||
<td style="text-align: right; padding: 3px; font-size: 7pt; color: #666;">Current</td>
|
||||
<td style="text-align: right; padding: 3px; font-size: 7pt; color: #666;">YTD</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px 5px;">Total Pay</td>
|
||||
<td style="text-align: right; padding: 2px;"><t t-esc="'{:,.2f}'.format(stub_data.get('summary',{}).get('total_pay',{}).get('current',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px;"><t t-esc="'{:,.2f}'.format(stub_data.get('summary',{}).get('total_pay',{}).get('ytd',0))"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px 5px;">Taxes</td>
|
||||
<td style="text-align: right; padding: 2px; color: #c00;">-<t t-esc="'{:,.2f}'.format(stub_data.get('summary',{}).get('taxes',{}).get('current',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px;"><t t-esc="'{:,.2f}'.format(stub_data.get('summary',{}).get('taxes',{}).get('ytd',0))"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 2px 5px;">Deductions</td>
|
||||
<td style="text-align: right; padding: 2px;"><t t-esc="'{:,.2f}'.format(stub_data.get('summary',{}).get('deductions',{}).get('current',0))"/></td>
|
||||
<td style="text-align: right; padding: 2px;"><t t-esc="'{:,.2f}'.format(stub_data.get('summary',{}).get('deductions',{}).get('ytd',0))"/></td>
|
||||
</tr>
|
||||
<tr style="border-top: 2px solid #333; background: #333; color: white;">
|
||||
<td style="padding: 4px 5px; font-weight: bold; font-size: 10pt;">NET PAY</td>
|
||||
<td colspan="2" style="text-align: right; padding: 4px 5px; font-weight: bold; font-size: 14pt;">
|
||||
$<t t-esc="'{:,.2f}'.format(cheque.amount)"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Additional Info -->
|
||||
<div style="margin-top: 8px; font-size: 7pt; color: #666;">
|
||||
<div style="margin-bottom: 3px;">
|
||||
<span style="font-weight: bold;">Total Employer Cost:</span>
|
||||
<span style="float: right;">$<t t-esc="'{:,.2f}'.format(
|
||||
stub_data.get('employer',{}).get('ei',{}).get('current',0) +
|
||||
stub_data.get('employer',{}).get('cpp',{}).get('current',0) +
|
||||
stub_data.get('employer',{}).get('cpp2',{}).get('current',0)
|
||||
)"/></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Memo if available -->
|
||||
<div t-if="cheque.memo" style="margin-top: 6px; padding: 4px; background: #fffde7; border: 1px solid #fff59d; font-size: 7pt;">
|
||||
<span style="font-weight: bold;">MEMO:</span>
|
||||
<t t-esc="cheque.memo"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
74
fusion_payroll/reports/payroll_report_pdf.xml
Normal file
74
fusion_payroll/reports/payroll_report_pdf.xml
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Generic Payroll Report PDF Template -->
|
||||
<template id="payroll_report_pdf_template">
|
||||
<t t-call="web.html_container">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page">
|
||||
<!-- Header -->
|
||||
<div class="row mb-4">
|
||||
<div class="col-8">
|
||||
<h2><t t-out="options.get('report_name', 'Payroll Report')"/></h2>
|
||||
<p class="text-muted mb-0">
|
||||
<t t-if="options.get('date')">
|
||||
Period: <t t-out="options['date'].get('date_from', '')"/>
|
||||
to <t t-out="options['date'].get('date_to', '')"/>
|
||||
</t>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-4 text-end">
|
||||
<strong><t t-out="company.name"/></strong><br/>
|
||||
<small class="text-muted">
|
||||
Generated: <t t-out="datetime.datetime.now().strftime('%Y-%m-%d %H:%M')"/>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Report Table -->
|
||||
<table class="table table-sm table-bordered">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<t t-foreach="columns" t-as="column">
|
||||
<th t-att-class="column.get('type') in ['monetary', 'float'] and 'text-end' or ''">
|
||||
<t t-out="column.get('name', '')"/>
|
||||
</th>
|
||||
</t>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-foreach="lines" t-as="line">
|
||||
<tr t-att-class="line.get('level', 0) < 0 and 'fw-bold' or ''">
|
||||
<t t-foreach="columns" t-as="column">
|
||||
<td t-att-class="column.get('type') in ['monetary', 'float'] and 'text-end' or ''">
|
||||
<t t-set="value" t-value="line.get('values', {}).get(column.get('field'), '')"/>
|
||||
<t t-if="column.get('type') == 'monetary' and value">
|
||||
$<t t-out="'{:,.2f}'.format(float(value))"/>
|
||||
</t>
|
||||
<t t-elif="column.get('type') == 'float' and value">
|
||||
<t t-out="'{:,.2f}'.format(float(value))"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-out="value"/>
|
||||
</t>
|
||||
</td>
|
||||
</t>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="row mt-4">
|
||||
<div class="col-12 text-center">
|
||||
<small class="text-muted">
|
||||
This report is computer-generated. Please retain for your records.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
848
fusion_payroll/reports/payroll_reports.xml
Normal file
848
fusion_payroll/reports/payroll_reports.xml
Normal file
@@ -0,0 +1,848 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- PAYROLL REGISTER REPORT -->
|
||||
<!-- ============================================================ -->
|
||||
<record id="action_report_payroll_register" model="ir.actions.report">
|
||||
<field name="name">Payroll Register</field>
|
||||
<field name="model">hr.payslip.run</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">fusion_payroll.report_payroll_register_document</field>
|
||||
<field name="report_file">fusion_payroll.report_payroll_register_document</field>
|
||||
<field name="binding_model_id" ref="hr_payroll.model_hr_payslip_run"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
|
||||
<template id="report_payroll_register_document">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page">
|
||||
<h2 class="text-center">Payroll Register</h2>
|
||||
<h4 class="text-center text-muted"><t t-out="o.name"/></h4>
|
||||
|
||||
<div class="row mb-4">
|
||||
<div class="col-6">
|
||||
<strong>Company:</strong> <t t-out="o.company_id.name"/>
|
||||
</div>
|
||||
<div class="col-6 text-end">
|
||||
<strong>Period:</strong> <t t-out="o.date_start"/> to <t t-out="o.date_end"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-sm table-bordered">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Employee</th>
|
||||
<th class="text-end">Gross Pay</th>
|
||||
<th class="text-end">CPP</th>
|
||||
<th class="text-end">EI</th>
|
||||
<th class="text-end">Income Tax</th>
|
||||
<th class="text-end">Deductions</th>
|
||||
<th class="text-end">Net Pay</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-set="total_gross" t-value="0"/>
|
||||
<t t-set="total_cpp" t-value="0"/>
|
||||
<t t-set="total_ei" t-value="0"/>
|
||||
<t t-set="total_tax" t-value="0"/>
|
||||
<t t-set="total_net" t-value="0"/>
|
||||
<t t-foreach="o.slip_ids" t-as="slip">
|
||||
<t t-set="total_gross" t-value="total_gross + slip.gross_wage"/>
|
||||
<t t-set="total_cpp" t-value="total_cpp + slip.employee_cpp"/>
|
||||
<t t-set="total_ei" t-value="total_ei + slip.employee_ei"/>
|
||||
<t t-set="total_tax" t-value="total_tax + slip.employee_income_tax"/>
|
||||
<t t-set="total_net" t-value="total_net + slip.net_wage"/>
|
||||
<tr>
|
||||
<td><t t-out="slip.employee_id.name"/></td>
|
||||
<td class="text-end"><t t-out="slip.gross_wage" t-options="{'widget': 'monetary', 'display_currency': slip.currency_id}"/></td>
|
||||
<td class="text-end"><t t-out="slip.employee_cpp" t-options="{'widget': 'monetary', 'display_currency': slip.currency_id}"/></td>
|
||||
<td class="text-end"><t t-out="slip.employee_ei" t-options="{'widget': 'monetary', 'display_currency': slip.currency_id}"/></td>
|
||||
<td class="text-end"><t t-out="slip.employee_income_tax" t-options="{'widget': 'monetary', 'display_currency': slip.currency_id}"/></td>
|
||||
<td class="text-end"><t t-out="slip.total_employee_deductions" t-options="{'widget': 'monetary', 'display_currency': slip.currency_id}"/></td>
|
||||
<td class="text-end"><t t-out="slip.net_wage" t-options="{'widget': 'monetary', 'display_currency': slip.currency_id}"/></td>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
<tfoot class="table-secondary fw-bold">
|
||||
<tr>
|
||||
<td>TOTALS (<t t-out="len(o.slip_ids)"/> employees)</td>
|
||||
<td class="text-end"><t t-out="total_gross" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
<td class="text-end"><t t-out="total_cpp" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
<td class="text-end"><t t-out="total_ei" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
<td class="text-end"><t t-out="total_tax" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
<td class="text-end">-</td>
|
||||
<td class="text-end"><t t-out="total_net" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<!-- Employer Contributions Summary -->
|
||||
<h5 class="mt-4">Employer Contributions</h5>
|
||||
<table class="table table-sm" style="width: 50%;">
|
||||
<t t-set="total_er_cpp" t-value="sum(o.slip_ids.mapped('employer_cpp'))"/>
|
||||
<t t-set="total_er_ei" t-value="sum(o.slip_ids.mapped('employer_ei'))"/>
|
||||
<tr>
|
||||
<td>Employer CPP</td>
|
||||
<td class="text-end"><t t-out="total_er_cpp" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Employer EI (1.4x)</td>
|
||||
<td class="text-end"><t t-out="total_er_ei" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
</tr>
|
||||
<tr class="fw-bold">
|
||||
<td>Total Employer Cost</td>
|
||||
<td class="text-end"><t t-out="total_er_cpp + total_er_ei" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Remittance Summary -->
|
||||
<h5 class="mt-4">CRA Remittance Summary</h5>
|
||||
<table class="table table-sm table-bordered" style="width: 50%;">
|
||||
<tr>
|
||||
<td>Employee CPP</td>
|
||||
<td class="text-end"><t t-out="total_cpp" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Employer CPP</td>
|
||||
<td class="text-end"><t t-out="total_er_cpp" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Employee EI</td>
|
||||
<td class="text-end"><t t-out="total_ei" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Employer EI</td>
|
||||
<td class="text-end"><t t-out="total_er_ei" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Income Tax Withheld</td>
|
||||
<td class="text-end"><t t-out="total_tax" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
</tr>
|
||||
<tr class="fw-bold table-warning">
|
||||
<td>TOTAL TO REMIT</td>
|
||||
<td class="text-end"><t t-out="total_cpp + total_er_cpp + total_ei + total_er_ei + total_tax" t-options="{'widget': 'monetary', 'display_currency': o.slip_ids[:1].currency_id}"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="text-muted small mt-4">
|
||||
<p>Generated on <t t-out="datetime.datetime.now().strftime('%Y-%m-%d %H:%M')"/></p>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- REMITTANCE SUMMARY REPORT -->
|
||||
<!-- ============================================================ -->
|
||||
<record id="action_report_remittance_summary" model="ir.actions.report">
|
||||
<field name="name">Remittance Summary</field>
|
||||
<field name="model">hr.tax.remittance</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">fusion_payroll.report_remittance_summary_document</field>
|
||||
<field name="report_file">fusion_payroll.report_remittance_summary_document</field>
|
||||
<field name="binding_model_id" ref="fusion_payroll.model_hr_tax_remittance"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
|
||||
<template id="report_remittance_summary_document">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page">
|
||||
<h2 class="text-center">CRA Remittance Summary</h2>
|
||||
<h4 class="text-center text-muted"><t t-out="o.name"/></h4>
|
||||
|
||||
<div class="row mb-4">
|
||||
<div class="col-6">
|
||||
<strong>Company:</strong> <t t-out="o.company_id.name"/><br/>
|
||||
<strong>Period:</strong> <t t-out="o.period_start"/> to <t t-out="o.period_end"/>
|
||||
</div>
|
||||
<div class="col-6 text-end">
|
||||
<strong>Due Date:</strong> <t t-out="o.due_date"/><br/>
|
||||
<strong>Status:</strong> <t t-out="o.state"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th class="text-end">Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Canada Pension Plan - Employee</td>
|
||||
<td class="text-end"><t t-out="o.cpp_employee" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Canada Pension Plan - Employer</td>
|
||||
<td class="text-end"><t t-out="o.cpp_employer" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
<tr t-if="o.cpp2_employee">
|
||||
<td>CPP2 - Employee</td>
|
||||
<td class="text-end"><t t-out="o.cpp2_employee" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
<tr t-if="o.cpp2_employer">
|
||||
<td>CPP2 - Employer</td>
|
||||
<td class="text-end"><t t-out="o.cpp2_employer" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Employment Insurance - Employee</td>
|
||||
<td class="text-end"><t t-out="o.ei_employee" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Employment Insurance - Employer (1.4x)</td>
|
||||
<td class="text-end"><t t-out="o.ei_employer" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Income Tax Withheld</td>
|
||||
<td class="text-end"><t t-out="o.income_tax" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot class="table-warning fw-bold fs-5">
|
||||
<tr>
|
||||
<td>TOTAL REMITTANCE</td>
|
||||
<td class="text-end"><t t-out="o.total" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<div class="mt-4" t-if="o.payment_date">
|
||||
<h5>Payment Information</h5>
|
||||
<table class="table table-sm" style="width: 50%;">
|
||||
<tr><td>Payment Date:</td><td><t t-out="o.payment_date"/></td></tr>
|
||||
<tr><td>Payment Method:</td><td><t t-out="o.payment_method or '-'"/></td></tr>
|
||||
<tr><td>Reference:</td><td><t t-out="o.payment_reference or '-'"/></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="text-muted small mt-4">
|
||||
<p>Generated on <t t-out="datetime.datetime.now().strftime('%Y-%m-%d %H:%M')"/></p>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- EMPLOYEE DIRECTORY REPORT -->
|
||||
<!-- ============================================================ -->
|
||||
<record id="action_report_employee_directory_pdf" model="ir.actions.report">
|
||||
<field name="name">Employee Directory (Canada)</field>
|
||||
<field name="model">hr.employee</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">fusion_payroll.report_employee_directory_document</field>
|
||||
<field name="report_file">fusion_payroll.report_employee_directory_document</field>
|
||||
<field name="binding_model_id" ref="hr.model_hr_employee"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
|
||||
<template id="report_employee_directory_document">
|
||||
<t t-call="web.html_container">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page">
|
||||
<h2 class="text-center">Employee Directory</h2>
|
||||
<h4 class="text-center text-muted"><t t-out="docs[0].company_id.name if docs else ''"/></h4>
|
||||
|
||||
<table class="table table-sm table-striped">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Employee ID</th>
|
||||
<th>Name</th>
|
||||
<th>Department</th>
|
||||
<th>Status</th>
|
||||
<th>Hire Date</th>
|
||||
<th>Pay Schedule</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-foreach="docs" t-as="emp">
|
||||
<tr>
|
||||
<td><t t-out="emp.employee_number or '-'"/></td>
|
||||
<td><t t-out="emp.name"/></td>
|
||||
<td><t t-out="emp.department_id.name or '-'"/></td>
|
||||
<td>
|
||||
<span t-if="emp.employment_status == 'active'" class="badge bg-success">Active</span>
|
||||
<span t-if="emp.employment_status == 'on_leave'" class="badge bg-warning">On Leave</span>
|
||||
<span t-if="emp.employment_status == 'terminated'" class="badge bg-danger">Terminated</span>
|
||||
</td>
|
||||
<td><t t-out="emp.hire_date"/></td>
|
||||
<td><t t-out="emp.pay_schedule or '-'"/></td>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="text-muted small mt-4">
|
||||
<p>Total Employees: <t t-out="len(docs)"/></p>
|
||||
<p>Generated on <t t-out="datetime.datetime.now().strftime('%Y-%m-%d %H:%M')"/></p>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- RECORD OF EMPLOYMENT (ROE) REPORT -->
|
||||
<!-- ============================================================ -->
|
||||
|
||||
<!-- Custom paperformat for ROE with no header/footer margins -->
|
||||
<record id="paperformat_roe" model="report.paperformat">
|
||||
<field name="name">ROE Letter Format</field>
|
||||
<field name="default" eval="False"/>
|
||||
<field name="format">Letter</field>
|
||||
<field name="page_height">0</field>
|
||||
<field name="page_width">0</field>
|
||||
<field name="orientation">Portrait</field>
|
||||
<field name="margin_top">11</field>
|
||||
<field name="margin_bottom">11</field>
|
||||
<field name="margin_left">9</field>
|
||||
<field name="margin_right">9</field>
|
||||
<field name="header_line" eval="False"/>
|
||||
<field name="header_spacing">0</field>
|
||||
<field name="dpi">90</field>
|
||||
</record>
|
||||
|
||||
<record id="action_report_roe" model="ir.actions.report">
|
||||
<field name="name">Record of Employment (ROE)</field>
|
||||
<field name="model">hr.roe</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">fusion_payroll.report_roe_document</field>
|
||||
<field name="report_file">fusion_payroll.report_roe_document</field>
|
||||
<field name="binding_model_id" ref="fusion_payroll.model_hr_roe"/>
|
||||
<field name="binding_type">report</field>
|
||||
<field name="paperformat_id" ref="paperformat_roe"/>
|
||||
</record>
|
||||
|
||||
<!-- ROE Report Template - Matches provided HTML exactly -->
|
||||
<template id="report_roe_document">
|
||||
<t t-call="web.html_container">
|
||||
<style>
|
||||
@page {
|
||||
size: letter;
|
||||
margin: 0.45in 0.35in;
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box !important;
|
||||
page-break-inside: avoid !important;
|
||||
}
|
||||
body, html, .o_body_html, #wrapwrap, main, .page, .article {
|
||||
font-family: Arial, sans-serif !important;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
position: relative !important;
|
||||
}
|
||||
.roe-wrapper {
|
||||
position: relative !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
.roe-form {
|
||||
border: 2px solid black !important;
|
||||
position: relative !important;
|
||||
width: 100% !important;
|
||||
page-break-inside: avoid !important;
|
||||
page-break-after: avoid !important;
|
||||
page-break-before: avoid !important;
|
||||
}
|
||||
.header {
|
||||
background-color: #000 !important;
|
||||
color: #fff !important;
|
||||
padding: 4px 8px !important;
|
||||
font-weight: bold !important;
|
||||
font-size: 12px !important;
|
||||
position: relative !important;
|
||||
z-index: 1 !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
.roe-form table {
|
||||
width: 100% !important;
|
||||
border-collapse: collapse !important;
|
||||
page-break-inside: avoid !important;
|
||||
}
|
||||
.roe-form table td {
|
||||
border: 1px solid black !important;
|
||||
padding: 1px !important;
|
||||
vertical-align: top !important;
|
||||
}
|
||||
.field-label, div.field-label, .roe-wrapper .field-label, .roe-form .field-label {
|
||||
background-color: #666 !important;
|
||||
color: #fff !important;
|
||||
font-size: 8px !important;
|
||||
font-weight: bold !important;
|
||||
padding: 3px 3px !important;
|
||||
line-height: 1.2 !important;
|
||||
display: block !important;
|
||||
vertical-align: top !important;
|
||||
width: 100% !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.field-number, div.field-number, .roe-wrapper .field-number, .roe-form .field-number {
|
||||
background-color: #000 !important;
|
||||
color: #fff !important;
|
||||
font-weight: bold !important;
|
||||
padding: 3px 3px !important;
|
||||
font-size: 8px !important;
|
||||
display: inline-block !important;
|
||||
vertical-align: top !important;
|
||||
line-height: 1.2 !important;
|
||||
margin: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
.small-text {
|
||||
font-size: 7px !important;
|
||||
line-height: 1.1 !important;
|
||||
}
|
||||
.date-boxes {
|
||||
display: inline-flex !important;
|
||||
gap: 1px !important;
|
||||
align-items: center !important;
|
||||
margin-top: 0px !important;
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
.date-box, div.date-box, .roe-wrapper .date-box, .roe-form .date-box {
|
||||
border: 1px solid black !important;
|
||||
width: 16px !important;
|
||||
height: 16px !important;
|
||||
text-align: center !important;
|
||||
font-size: 11.5px !important;
|
||||
line-height: 16px !important;
|
||||
display: inline-block !important;
|
||||
}
|
||||
.earnings-table {
|
||||
width: 100% !important;
|
||||
font-size: 12px !important;
|
||||
border-collapse: separate !important;
|
||||
border-spacing: 0 !important;
|
||||
}
|
||||
.earnings-table td {
|
||||
text-align: center !important;
|
||||
padding: 2px !important;
|
||||
border: 1px solid black !important;
|
||||
}
|
||||
.pp-col {
|
||||
width: 24px !important;
|
||||
}
|
||||
.footer-note {
|
||||
font-size: 10.5px !important;
|
||||
padding: 3px !important;
|
||||
}
|
||||
.checkbox {
|
||||
display: inline-block !important;
|
||||
width: 11px !important;
|
||||
height: 11px !important;
|
||||
border: 1px solid black !important;
|
||||
margin-right: 3px !important;
|
||||
text-align: center !important;
|
||||
vertical-align: middle !important;
|
||||
line-height: 11px !important;
|
||||
font-size: 9px !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
body, html, .o_body_html, #wrapwrap, main, .page, .article {
|
||||
position: relative !important;
|
||||
z-index: 1 !important;
|
||||
}
|
||||
.roe-wrapper, .roe-form, .roe-form * {
|
||||
position: relative !important;
|
||||
z-index: 1 !important;
|
||||
}
|
||||
/* Ensure title styling */
|
||||
.header, div[style*="RECORD OF EMPLOYMENT"], div[style*="background-color: #000"][style*="RECORD"] {
|
||||
position: relative !important;
|
||||
z-index: 1 !important;
|
||||
opacity: 1 !important;
|
||||
background-color: #000 !important;
|
||||
color: #fff !important;
|
||||
mix-blend-mode: normal !important;
|
||||
}
|
||||
@media print {
|
||||
body, html {
|
||||
margin: 0 !important;
|
||||
}
|
||||
* {
|
||||
page-break-inside: avoid !important;
|
||||
}
|
||||
.roe-form {
|
||||
page-break-inside: avoid !important;
|
||||
page-break-after: avoid !important;
|
||||
page-break-before: avoid !important;
|
||||
}
|
||||
body, html, .o_body_html, #wrapwrap, main, .page, .article {
|
||||
z-index: 1 !important;
|
||||
}
|
||||
.roe-wrapper, .roe-form, .roe-form * {
|
||||
z-index: 1 !important;
|
||||
}
|
||||
/* Ensure title styling */
|
||||
.header, div[style*="RECORD OF EMPLOYMENT"], div[style*="background-color: #000"][style*="RECORD"] {
|
||||
position: relative !important;
|
||||
z-index: 1 !important;
|
||||
opacity: 1 !important;
|
||||
background-color: #000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-set="ppt" t-value="{'W':'Weekly','B':'Bi-weekly','S':'Semi-monthly','M':'Monthly','T':'13 Pay Periods'}"/>
|
||||
<t t-set="rc" t-value="{'A':'A - Shortage of Work','B':'B - Strike or Lockout','C':'C - Return to School','D':'D - Illness or Injury','E':'E - Quit','F':'F - Maternity','G':'G - Retirement','H':'H - Work Sharing','J':'J - Apprentice Training','K':'K - Other','M':'M - Dismissal','N':'N - Leave of Absence','P':'P - Parental','Z':'Z - Compassionate Care'}"/>
|
||||
<t t-set="ed" t-value="{pp.sequence: pp.amount for pp in o.pay_period_earnings_ids}"/>
|
||||
<t t-set="td" t-value="datetime.datetime.now()"/>
|
||||
<div style="position: relative; width: 100%;">
|
||||
<div style="border: 2px solid black; position: relative; width: 100%;">
|
||||
<div style="background-color: #000 !important; color: #fff !important; padding: 4px 8px; font-weight: bold; font-size: 12px; position: relative !important; z-index: 1 !important; opacity: 1 !important; mix-blend-mode: normal !important;">RECORD OF EMPLOYMENT (ROE)</div>
|
||||
<table style="border-collapse: collapse; width: 100%;">
|
||||
<tr>
|
||||
<td style="width: 33%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">1</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">SERIAL NO.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 2px 8px; font-size: 12px;">N/A*</div>
|
||||
</td>
|
||||
<td style="width: 33%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">2</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">SERIAL NO. OF ROE AMENDED OR REPLACED</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 2px 8px; font-size: 12px;">N/A*</div>
|
||||
</td>
|
||||
<td style="width: 34%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">3</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">EMPLOYER'S PAYROLL REFERENCE NO.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 2px 8px; font-size: 12px;"><t t-out="o.employee_id.employee_number or ''"/></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="border-collapse: collapse; width: 100%;">
|
||||
<tr>
|
||||
<td style="width: 66%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">4</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">EMPLOYER'S NAME AND ADDRESS</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 4px 8px; font-size: 12px;">
|
||||
<t t-out="o.company_id.name or ''"/><br/>
|
||||
<t t-out="o.company_id.street or ''"/><br/>
|
||||
<t t-out="o.company_id.city or ''"/>, <t t-out="o.company_id.state_id.code or ''"/> <t t-out="o.company_id.zip or ''"/>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width: 34%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">5</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">CRA BUSINESS NUMBER (BN)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 2px 8px; font-size: 12px;"><t t-out="o.cra_business_number or ''"/></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 66%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">7</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">POSTAL CODE</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 2px 8px; font-size: 12px;"><t t-out="o.company_id.zip or ''"/></div>
|
||||
</td>
|
||||
<td style="width: 34%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">6</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">PAY PERIOD TYPE</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 2px 8px; font-size: 12px;"><t t-out="o.pay_period_type or ''"/> - <t t-out="ppt.get(o.pay_period_type,'')"/></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 66%; border: 1px solid black; padding: 0; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">9</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">EMPLOYEE'S NAME AND ADDRESS</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 8px; font-size: 12px; border-top: 1px solid black; min-height: 80px;">
|
||||
<t t-out="o.employee_id.name or ''"/><br/>
|
||||
<t t-out="o.employee_id.home_street or ''"/><br/>
|
||||
<t t-out="o.employee_id.home_city or ''"/>, <t t-out="o.employee_id.home_province or ''"/> <t t-out="o.employee_id.home_postal_code or ''"/>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width: 34%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">8</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">SOCIAL INSURANCE NO.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 2px 8px; font-size: 12px;"><t t-out="o.sin_number or ''"/></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 66%; border: 1px solid black; padding: 1px; vertical-align: top;"></td>
|
||||
<td style="width: 34%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">10</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">FIRST DAY WORKED</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="date-boxes">
|
||||
<span style="font-size:8px; display: inline-block; vertical-align: middle; line-height: 16px; height: 16px;">D</span><div class="date-box"><t t-if="o.first_day_worked" t-out="o.first_day_worked.strftime('%d')[0]"/></div><div class="date-box"><t t-if="o.first_day_worked" t-out="o.first_day_worked.strftime('%d')[1]"/></div>
|
||||
<span style="font-size:8px; margin-left:2px; display: inline-block; vertical-align: middle; line-height: 16px; height: 16px;">M</span><div class="date-box"><t t-if="o.first_day_worked" t-out="o.first_day_worked.strftime('%m')[0]"/></div><div class="date-box"><t t-if="o.first_day_worked" t-out="o.first_day_worked.strftime('%m')[1]"/></div>
|
||||
<span style="font-size:8px; margin-left:2px; display: inline-block; vertical-align: middle; line-height: 16px; height: 16px;">Y</span><div class="date-box"><t t-if="o.first_day_worked" t-out="o.first_day_worked.strftime('%Y')[0]"/></div><div class="date-box"><t t-if="o.first_day_worked" t-out="o.first_day_worked.strftime('%Y')[1]"/></div><div class="date-box"><t t-if="o.first_day_worked" t-out="o.first_day_worked.strftime('%Y')[2]"/></div><div class="date-box"><t t-if="o.first_day_worked" t-out="o.first_day_worked.strftime('%Y')[3]"/></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 66%; border: 1px solid black; padding: 1px; vertical-align: top;"></td>
|
||||
<td style="width: 34%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">11</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">LAST DAY FOR WHICH PAID</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="date-boxes">
|
||||
<span style="font-size:8px; display: inline-block; vertical-align: middle; line-height: 16px; height: 16px;">D</span><div class="date-box"><t t-if="o.last_day_paid" t-out="o.last_day_paid.strftime('%d')[0]"/></div><div class="date-box"><t t-if="o.last_day_paid" t-out="o.last_day_paid.strftime('%d')[1]"/></div>
|
||||
<span style="font-size:8px; margin-left:2px; display: inline-block; vertical-align: middle; line-height: 16px; height: 16px;">M</span><div class="date-box"><t t-if="o.last_day_paid" t-out="o.last_day_paid.strftime('%m')[0]"/></div><div class="date-box"><t t-if="o.last_day_paid" t-out="o.last_day_paid.strftime('%m')[1]"/></div>
|
||||
<span style="font-size:8px; margin-left:2px; display: inline-block; vertical-align: middle; line-height: 16px; height: 16px;">Y</span><div class="date-box"><t t-if="o.last_day_paid" t-out="o.last_day_paid.strftime('%Y')[0]"/></div><div class="date-box"><t t-if="o.last_day_paid" t-out="o.last_day_paid.strftime('%Y')[1]"/></div><div class="date-box"><t t-if="o.last_day_paid" t-out="o.last_day_paid.strftime('%Y')[2]"/></div><div class="date-box"><t t-if="o.last_day_paid" t-out="o.last_day_paid.strftime('%Y')[3]"/></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 66%; border: 1px solid black; padding: 1px; vertical-align: top;"></td>
|
||||
<td style="width: 34%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">12</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">FINAL PAY PERIOD ENDING DATE</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="date-boxes">
|
||||
<span style="font-size:8px; display: inline-block; vertical-align: middle; line-height: 16px; height: 16px;">D</span><div class="date-box"><t t-if="o.final_pay_period_end" t-out="o.final_pay_period_end.strftime('%d')[0]"/></div><div class="date-box"><t t-if="o.final_pay_period_end" t-out="o.final_pay_period_end.strftime('%d')[1]"/></div>
|
||||
<span style="font-size:8px; margin-left:2px; display: inline-block; vertical-align: middle; line-height: 16px; height: 16px;">M</span><div class="date-box"><t t-if="o.final_pay_period_end" t-out="o.final_pay_period_end.strftime('%m')[0]"/></div><div class="date-box"><t t-if="o.final_pay_period_end" t-out="o.final_pay_period_end.strftime('%m')[1]"/></div>
|
||||
<span style="font-size:8px; margin-left:2px; display: inline-block; vertical-align: middle; line-height: 16px; height: 16px;">Y</span><div class="date-box"><t t-if="o.final_pay_period_end" t-out="o.final_pay_period_end.strftime('%Y')[0]"/></div><div class="date-box"><t t-if="o.final_pay_period_end" t-out="o.final_pay_period_end.strftime('%Y')[1]"/></div><div class="date-box"><t t-if="o.final_pay_period_end" t-out="o.final_pay_period_end.strftime('%Y')[2]"/></div><div class="date-box"><t t-if="o.final_pay_period_end" t-out="o.final_pay_period_end.strftime('%Y')[3]"/></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="border-collapse: collapse; width: 100%;">
|
||||
<tr>
|
||||
<td style="width: 50%; border: 1px solid black; padding: 0; vertical-align: top;">
|
||||
<table style="border-collapse: collapse; width: 100%; height: 100%;">
|
||||
<tr style="height: 33.33%;">
|
||||
<td style="border: 1px solid black; padding: 0; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">13</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">OCCUPATION</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 8px; font-size: 12px; border-top: 1px solid black; height: 100%; box-sizing: border-box;"><t t-out="o.occupation or o.employee_id.job_id.name or ''"/></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 33.33%;">
|
||||
<td style="border: 1px solid black; border-top: 0; padding: 0; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">15A</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">TOTAL INSURABLE HOURS</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 8px; font-size: 12px; border-top: 1px solid black; border: 1px solid black; margin: 4px; height: 100%; box-sizing: border-box;"><t t-out="'{:.0f}'.format(o.total_insurable_hours or 0)"/></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 33.33%;">
|
||||
<td style="border: 1px solid black; border-top: 0; padding: 0; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">15B</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">TOTAL INSURABLE EARNINGS</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 8px; font-size: 12px; border-top: 1px solid black; border: 1px solid black; margin: 4px; height: 100%; box-sizing: border-box;"><t t-out="'{:,.2f}'.format(o.total_insurable_earnings or 0)"/></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="width: 50%; border: 1px solid black; padding: 0; vertical-align: top;">
|
||||
<div style="border: 1px solid black; padding: 1px;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">14</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">EXPECTED DATE OF RECALL</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="date-boxes" style="border-top: 1px solid black; padding: 2px 8px;">
|
||||
<span style="font-size:8px; display: inline-block; vertical-align: middle; line-height: 16px; height: 16px;">D</span><div class="date-box"><t t-if="o.expected_recall_date" t-out="o.expected_recall_date.strftime('%d')[0]"/></div><div class="date-box"><t t-if="o.expected_recall_date" t-out="o.expected_recall_date.strftime('%d')[1]"/></div>
|
||||
<span style="font-size:8px; margin-left:2px; display: inline-block; vertical-align: middle; line-height: 16px; height: 16px;">M</span><div class="date-box"><t t-if="o.expected_recall_date" t-out="o.expected_recall_date.strftime('%m')[0]"/></div><div class="date-box"><t t-if="o.expected_recall_date" t-out="o.expected_recall_date.strftime('%m')[1]"/></div>
|
||||
<span style="font-size:8px; margin-left:2px; display: inline-block; vertical-align: middle; line-height: 16px; height: 16px;">Y</span><div class="date-box"><t t-if="o.expected_recall_date" t-out="o.expected_recall_date.strftime('%Y')[0]"/></div><div class="date-box"><t t-if="o.expected_recall_date" t-out="o.expected_recall_date.strftime('%Y')[1]"/></div><div class="date-box"><t t-if="o.expected_recall_date" t-out="o.expected_recall_date.strftime('%Y')[2]"/></div><div class="date-box"><t t-if="o.expected_recall_date" t-out="o.expected_recall_date.strftime('%Y')[3]"/></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="border: 1px solid black; border-top: 0; padding: 1px;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">16</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">REASON FOR ISSUING THIS ROE</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 2px 8px; font-size: 12px; border-top: 1px solid black;"><t t-out="rc.get(o.reason_code, o.reason_code or '')"/></div>
|
||||
</div>
|
||||
|
||||
<div style="border: 1px solid black; border-top: 0; padding: 1px;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">FOR FURTHER INFORMATION, CONTACT</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 4px 8px; font-size: 12px; border-top: 1px solid black;"><t t-out="o.contact_name or ''"/><br/><t t-out="o.contact_phone or ''"/></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="border-collapse: collapse; width: 100%;">
|
||||
<tr>
|
||||
<td style="width: 50%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">15C</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">THE FIRST ENTRY MUST RECORD THE INSURABLE EARNINGS FOR THE FINAL (MOST RECENT) INSURED PAY PERIOD. ENTER DETAILS BY PAY PERIOD</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="earnings-table">
|
||||
<tr>
|
||||
<td class="pp-col"><strong>PP</strong></td>
|
||||
<td><strong>INSURABLE<br/>EARNINGS</strong></td>
|
||||
<td class="pp-col"><strong>PP</strong></td>
|
||||
<td><strong>INSURABLE<br/>EARNINGS</strong></td>
|
||||
<td class="pp-col"><strong>PP</strong></td>
|
||||
<td><strong>INSURABLE<br/>EARNINGS</strong></td>
|
||||
</tr>
|
||||
<t t-foreach="range(1, 54, 3)" t-as="r">
|
||||
<tr>
|
||||
<td><t t-if="r <= 53" t-out="r"/></td>
|
||||
<td><t t-if="r in ed" t-out="'{:,.2f}'.format(ed[r])"/></td>
|
||||
<td><t t-if="r+1 <= 53" t-out="r+1"/></td>
|
||||
<td><t t-if="r+1 in ed" t-out="'{:,.2f}'.format(ed[r+1])"/></td>
|
||||
<td><t t-if="r+2 <= 53" t-out="r+2"/></td>
|
||||
<td><t t-if="r+2 in ed" t-out="'{:,.2f}'.format(ed[r+2])"/></td>
|
||||
</tr>
|
||||
</t>
|
||||
</table>
|
||||
</td>
|
||||
<td style="width: 50%; border: 1px solid black; padding: 0; vertical-align: top;">
|
||||
<table style="border-collapse: collapse; width: 100%; height: 100%;">
|
||||
<tr style="height: 100%;">
|
||||
<td style="border: 1px solid black; padding: 1px; vertical-align: top; height: 100%;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">17</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">ONLY COMPLETE IF PAYMENT OR BENEFITS (OTHER THAN REGULAR PAY) PAID DURING OR IN ANTICIPATION OF THE FINAL PAY PERIOD OR PAYABLE AT A LATER DATE</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 4px 8px; font-size: 12px; text-align: center; min-height: 200px; line-height: 200px;"><t t-out="o.other_payments or 'N/A*'"/></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border: 1px solid black; padding: 1px; vertical-align: middle; height: 40px;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">18</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">COMMENTS</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 4px 8px; font-size: 12px; text-align: center; line-height: 20px;"><t t-out="o.comments or 'N/A*'"/></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border: 1px solid black; padding: 1px; vertical-align: middle; height: 40px;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">19</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">ONLY COMPLETE IF PAID SICK/MATERNITY/PARENTAL LEAVE OR GROUP WAGE LOSS INDEMNITY PAYMENT (AFTER THE LAST DAY WORKED)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 4px 8px; font-size: 12px; text-align: center; line-height: 20px;">N/A*</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="border-collapse: collapse; width: 100%;">
|
||||
<tr>
|
||||
<td style="width: 30%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">20</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">COMMUNICATION PREFERRED IN</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 2px 8px; font-size: 13.5px;">
|
||||
<span class="checkbox" style="line-height: 11px; font-size: 9px; padding: 0;"><t t-if="o.communication_language=='E'">X</t></span> ENGLISH
|
||||
<span style="margin-left: 12px;"><span class="checkbox" style="display: inline-block; width: 11px; height: 11px; border: 1px solid black; margin-right: 3px; text-align: center; vertical-align: middle; line-height: 11px; font-size: 9px; padding: 0;"><t t-if="o.communication_language=='F'">X</t></span> FRENCH</span>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width: 30%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="display: table; width: 100%; border-collapse: collapse;">
|
||||
<div style="display: table-row;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: table-cell; vertical-align: top; line-height: 1.2; white-space: nowrap;">21</div>
|
||||
<div style="background-color: #666; color: #fff; font-size: 8px; font-weight: bold; padding: 3px 3px; line-height: 1.2; display: table-cell; vertical-align: top; width: 100%;">TELEPHONE NO.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 2px 8px; font-size: 12px;"><t t-out="o.contact_phone or ''"/></div>
|
||||
</td>
|
||||
<td style="width: 40%; border: 1px solid black; padding: 1px; vertical-align: top;">
|
||||
<div style="background-color: #000; color: #fff; font-weight: bold; padding: 3px 3px; font-size: 8px; display: inline-block; vertical-align: top; line-height: 1.2;">22</div>
|
||||
<div style="font-size: 10.5px; line-height: 1.1;">I AM AWARE THAT IT IS AN OFFENSE TO MAKE FALSE ENTRIES AND HEREBY CERTIFY THAT ALL STATEMENTS ON THIS FORM ARE TRUE</div>
|
||||
<div style="margin-top: 2px; font-size: 12px;">
|
||||
Name of Issuer <span style="border-bottom:1px solid #000; padding: 0 25px; display: inline-block; min-width: 180px;"></span><br/>
|
||||
Issuer <span style="border-bottom:1px solid #000; padding: 0 25px; display: inline-block; min-width: 220px;"></span><br/>
|
||||
Name <span style="border-bottom:1px solid #000; padding: 0 25px; display: inline-block; min-width: 220px;"><t t-out="o.contact_name or ''"/></span>
|
||||
</div>
|
||||
<div class="date-boxes" style="margin-top: 2px; float: right;">
|
||||
<span style="font-size:8px;">D</span><div class="date-box"><t t-out="td.strftime('%d')[0]"/></div><div class="date-box"><t t-out="td.strftime('%d')[1]"/></div>
|
||||
<span style="font-size:8px; margin-left:2px;">M</span><div class="date-box"><t t-out="td.strftime('%m')[0]"/></div><div class="date-box"><t t-out="td.strftime('%m')[1]"/></div>
|
||||
<span style="font-size:8px; margin-left:2px;">Y</span><div class="date-box"><t t-out="td.strftime('%Y')[0]"/></div><div class="date-box"><t t-out="td.strftime('%Y')[1]"/></div><div class="date-box"><t t-out="td.strftime('%Y')[2]"/></div><div class="date-box"><t t-out="td.strftime('%Y')[3]"/></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="footer-note">
|
||||
*Not currently supported by Fusion Payroll
|
||||
<span style="float: right;">REV OSP</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
345
fusion_payroll/reports/report_paystub_canada.xml
Normal file
345
fusion_payroll/reports/report_paystub_canada.xml
Normal file
@@ -0,0 +1,345 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Pay Stub Report Action -->
|
||||
<record id="action_report_paystub_canada" model="ir.actions.report">
|
||||
<field name="name">Pay Stub (Canada)</field>
|
||||
<field name="model">hr.payslip</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">fusion_payroll.report_paystub_canada_document</field>
|
||||
<field name="report_file">fusion_payroll.report_paystub_canada_document</field>
|
||||
<field name="binding_model_id" ref="hr_payroll.model_hr_payslip"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
|
||||
<!-- Pay Stub Template -->
|
||||
<template id="report_paystub_canada_document">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page">
|
||||
<!-- Header Section -->
|
||||
<div class="row mb-4">
|
||||
<div class="col-6">
|
||||
<h5 class="text-muted">EMPLOYER</h5>
|
||||
<strong><t t-out="o.company_id.name"/></strong><br/>
|
||||
<t t-if="o.company_id.street"><t t-out="o.company_id.street"/><br/></t>
|
||||
<t t-if="o.company_id.city">
|
||||
<t t-out="o.company_id.city"/>,
|
||||
<t t-out="o.company_id.state_id.code or ''"/>
|
||||
<t t-out="o.company_id.zip or ''"/>
|
||||
</t>
|
||||
</div>
|
||||
<div class="col-6 text-end">
|
||||
<h3>Pay Stub</h3>
|
||||
<table class="table table-sm table-borderless text-end" style="margin-left: auto;">
|
||||
<tr>
|
||||
<td class="text-muted">Pay Date:</td>
|
||||
<td><strong><t t-out="o.date_to" t-options="{'widget': 'date'}"/></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-muted">Cheque #:</td>
|
||||
<td><t t-out="o.cheque_number or '-'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-muted">Net Pay:</td>
|
||||
<td class="fs-4 text-success"><strong><t t-out="o.net_wage" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Employee Info -->
|
||||
<div class="row mb-4">
|
||||
<div class="col-6">
|
||||
<h5 class="text-muted">EMPLOYEE</h5>
|
||||
<strong><t t-out="o.employee_id.name"/></strong><br/>
|
||||
<t t-if="o.employee_id.home_street"><t t-out="o.employee_id.home_street"/><br/></t>
|
||||
<t t-if="o.employee_id.home_city">
|
||||
<t t-out="o.employee_id.home_city"/>,
|
||||
<t t-out="o.employee_id.home_province or ''"/>
|
||||
<t t-out="o.employee_id.home_postal_code or ''"/>
|
||||
</t>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<h5 class="text-muted">PAY PERIOD</h5>
|
||||
<table class="table table-sm table-borderless">
|
||||
<tr>
|
||||
<td>Period Beginning:</td>
|
||||
<td><t t-out="o.date_from" t-options="{'widget': 'date'}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Period Ending:</td>
|
||||
<td><t t-out="o.date_to" t-options="{'widget': 'date'}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pay Date:</td>
|
||||
<td><t t-out="o.date_to" t-options="{'widget': 'date'}"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Earnings Section -->
|
||||
<h5 class="bg-light p-2">EARNINGS</h5>
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th class="text-end">Hours</th>
|
||||
<th class="text-end">Rate</th>
|
||||
<th class="text-end">Current</th>
|
||||
<th class="text-end">YTD</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-foreach="o.line_ids.filtered(lambda l: l.category_id.code in ['BASIC', 'ALW'] and l.total != 0)" t-as="line">
|
||||
<tr>
|
||||
<td><t t-out="line.name"/></td>
|
||||
<td class="text-end"><t t-out="line.quantity" t-options="{'widget': 'float', 'precision': 2}"/></td>
|
||||
<td class="text-end"><t t-out="line.rate" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
<td class="text-end"><t t-out="line.total" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
<td class="text-end text-muted">-</td>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="fw-bold">
|
||||
<td colspan="3">Total Earnings</td>
|
||||
<td class="text-end"><t t-out="o.gross_wage" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
<td class="text-end text-muted"><t t-out="o.ytd_gross" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<!-- Taxes Section -->
|
||||
<h5 class="bg-light p-2">TAXES</h5>
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th class="text-end">Current</th>
|
||||
<th class="text-end">YTD</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Income Tax</td>
|
||||
<td class="text-end"><t t-out="o.employee_income_tax" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
<td class="text-end text-muted"><t t-out="o.ytd_income_tax" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Employment Insurance</td>
|
||||
<td class="text-end"><t t-out="o.employee_ei" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
<td class="text-end text-muted"><t t-out="o.ytd_ei" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Canada Pension Plan</td>
|
||||
<td class="text-end"><t t-out="o.employee_cpp" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
<td class="text-end text-muted"><t t-out="o.ytd_cpp" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
<tr t-if="o.employee_cpp2">
|
||||
<td>Second Canada Pension Plan</td>
|
||||
<td class="text-end"><t t-out="o.employee_cpp2" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
<td class="text-end text-muted"><t t-out="o.ytd_cpp2" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="fw-bold">
|
||||
<td>Total Taxes</td>
|
||||
<td class="text-end"><t t-out="o.total_employee_deductions" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<!-- Summary Section -->
|
||||
<div class="row mt-4">
|
||||
<div class="col-6 offset-6">
|
||||
<h5 class="bg-dark text-white p-2">SUMMARY</h5>
|
||||
<table class="table table-sm">
|
||||
<tr>
|
||||
<td>Total Pay</td>
|
||||
<td class="text-end"><t t-out="o.gross_wage" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
<td class="text-end text-muted"><t t-out="o.ytd_gross" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Taxes</td>
|
||||
<td class="text-end text-danger">-<t t-out="o.total_employee_deductions" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deductions</td>
|
||||
<td class="text-end">$0.00</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="fw-bold fs-5">
|
||||
<td>Net Pay</td>
|
||||
<td class="text-end text-success"><t t-out="o.net_wage" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
<td class="text-end text-muted"><t t-out="o.ytd_net" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="row mt-4 pt-4 border-top">
|
||||
<div class="col-12 text-center text-muted small">
|
||||
<p>This is a computer-generated document. Please retain for your records.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- Cheque-Style Pay Stub (3-part format) -->
|
||||
<record id="action_report_paycheque_canada" model="ir.actions.report">
|
||||
<field name="name">Paycheque (Canada)</field>
|
||||
<field name="model">hr.payslip</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">fusion_payroll.report_paycheque_canada_document</field>
|
||||
<field name="report_file">fusion_payroll.report_paycheque_canada_document</field>
|
||||
<field name="binding_model_id" ref="hr_payroll.model_hr_payslip"/>
|
||||
<field name="binding_type">report</field>
|
||||
<field name="paperformat_id" ref="base.paperformat_us"/>
|
||||
</record>
|
||||
|
||||
<template id="report_paycheque_canada_document">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<div class="page" style="page-break-after: always;">
|
||||
|
||||
<!-- TOP STUB - Employee Copy -->
|
||||
<div style="height: 30%; border-bottom: 1px dashed #ccc; padding-bottom: 10px; margin-bottom: 10px;">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<small class="text-muted">EMPLOYEE COPY</small>
|
||||
<h5><t t-out="o.employee_id.name"/></h5>
|
||||
<t t-if="o.employee_id.home_street"><small><t t-out="o.employee_id.home_street"/></small><br/></t>
|
||||
<t t-if="o.employee_id.home_city">
|
||||
<small><t t-out="o.employee_id.home_city"/>, <t t-out="o.employee_id.home_province or ''"/> <t t-out="o.employee_id.home_postal_code or ''"/></small>
|
||||
</t>
|
||||
</div>
|
||||
<div class="col-6 text-end">
|
||||
<table class="table table-sm table-borderless" style="font-size: 0.8em;">
|
||||
<tr><td>Pay Period:</td><td><t t-out="o.date_from"/> - <t t-out="o.date_to"/></td></tr>
|
||||
<tr><td>Pay Date:</td><td><t t-out="o.date_to"/></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="font-size: 0.75em;">
|
||||
<div class="col-4">
|
||||
<strong>PAY</strong>
|
||||
<table class="table table-sm">
|
||||
<t t-foreach="o.line_ids.filtered(lambda l: l.category_id.code in ['BASIC', 'ALW'] and l.total != 0)" t-as="line">
|
||||
<tr><td><t t-out="line.name"/></td><td class="text-end"><t t-out="line.total" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
</t>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>TAXES</strong>
|
||||
<table class="table table-sm">
|
||||
<tr><td>Income Tax</td><td class="text-end"><t t-out="o.employee_income_tax" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
<tr><td>EI</td><td class="text-end"><t t-out="o.employee_ei" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
<tr><td>CPP</td><td class="text-end"><t t-out="o.employee_cpp" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>SUMMARY</strong>
|
||||
<table class="table table-sm">
|
||||
<tr><td>Total Pay</td><td class="text-end"><t t-out="o.gross_wage" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
<tr><td>Taxes</td><td class="text-end"><t t-out="o.total_employee_deductions" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
<tr class="fw-bold"><td>NET PAY</td><td class="text-end"><t t-out="o.net_wage" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- MIDDLE - Cheque -->
|
||||
<div style="height: 35%; border-bottom: 1px dashed #ccc; padding: 20px 0;">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<strong><t t-out="o.company_id.name"/></strong><br/>
|
||||
<small>
|
||||
<t t-if="o.company_id.street"><t t-out="o.company_id.street"/><br/></t>
|
||||
<t t-if="o.company_id.city"><t t-out="o.company_id.city"/>, <t t-out="o.company_id.state_id.code or ''"/> <t t-out="o.company_id.zip or ''"/></t>
|
||||
</small>
|
||||
</div>
|
||||
<div class="col-4 text-end">
|
||||
<small class="text-muted">DATE</small>
|
||||
<h5><t t-out="o.date_to" t-options="{'widget': 'date'}"/></h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="col-12">
|
||||
<p class="mb-1">Pay to the order of:</p>
|
||||
<h4 class="border-bottom pb-2"><t t-out="o.employee_id.name"/></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-8">
|
||||
<p><strong>**<t t-out="o.net_wage" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/>**</strong></p>
|
||||
</div>
|
||||
<div class="col-4 text-end">
|
||||
<small class="text-muted">Cheque #</small><br/>
|
||||
<strong><t t-out="o.cheque_number or '______'"/></strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-12">
|
||||
<small class="text-muted">MEMO: Pay Period <t t-out="o.date_from"/> - <t t-out="o.date_to"/></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- BOTTOM STUB - Employer Copy -->
|
||||
<div style="height: 30%; padding-top: 10px;">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<small class="text-muted">EMPLOYER COPY</small>
|
||||
<h5><t t-out="o.employee_id.name"/></h5>
|
||||
</div>
|
||||
<div class="col-6 text-end">
|
||||
<table class="table table-sm table-borderless" style="font-size: 0.8em;">
|
||||
<tr><td>Pay Period:</td><td><t t-out="o.date_from"/> - <t t-out="o.date_to"/></td></tr>
|
||||
<tr><td>Pay Date:</td><td><t t-out="o.date_to"/></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="font-size: 0.75em;">
|
||||
<div class="col-4">
|
||||
<strong>PAY</strong>
|
||||
<table class="table table-sm">
|
||||
<t t-foreach="o.line_ids.filtered(lambda l: l.category_id.code in ['BASIC', 'ALW'] and l.total != 0)" t-as="line">
|
||||
<tr><td><t t-out="line.name"/></td><td class="text-end"><t t-out="line.total" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
</t>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>TAXES</strong>
|
||||
<table class="table table-sm">
|
||||
<tr><td>Income Tax</td><td class="text-end"><t t-out="o.employee_income_tax" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
<tr><td>EI</td><td class="text-end"><t t-out="o.employee_ei" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
<tr><td>CPP</td><td class="text-end"><t t-out="o.employee_cpp" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<strong>SUMMARY</strong>
|
||||
<table class="table table-sm">
|
||||
<tr><td>Total Pay</td><td class="text-end"><t t-out="o.gross_wage" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
<tr><td>Taxes</td><td class="text-end"><t t-out="o.total_employee_deductions" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
<tr class="fw-bold"><td>NET PAY</td><td class="text-end"><t t-out="o.net_wage" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user