changes
This commit is contained in:
@@ -62,6 +62,45 @@
|
||||
autocomplete="cc-name"/>
|
||||
</div>
|
||||
|
||||
<!-- Card type selector (for terminal payments where card brand cannot be auto-detected) -->
|
||||
<div class="mb-3 o_poynt_card_type_section" style="display:none;">
|
||||
<label class="form-label">Card Type</label>
|
||||
<div class="d-flex gap-2 flex-wrap">
|
||||
<div class="form-check">
|
||||
<input type="radio" class="form-check-input" name="poynt_card_type"
|
||||
id="poynt_ct_visa" value="visa"/>
|
||||
<label class="form-check-label" for="poynt_ct_visa">Visa</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="radio" class="form-check-input" name="poynt_card_type"
|
||||
id="poynt_ct_mc" value="mastercard"/>
|
||||
<label class="form-check-label" for="poynt_ct_mc">Mastercard</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="radio" class="form-check-input" name="poynt_card_type"
|
||||
id="poynt_ct_amex" value="amex"/>
|
||||
<label class="form-check-label" for="poynt_ct_amex">Amex</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="radio" class="form-check-input" name="poynt_card_type"
|
||||
id="poynt_ct_other" value="other" checked="checked"/>
|
||||
<label class="form-check-label" for="poynt_ct_other">Other</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Surcharge notice (shown when surcharge is enabled) -->
|
||||
<div class="mb-3 o_poynt_surcharge_notice" style="display:none;">
|
||||
<div class="alert alert-info py-2 mb-0">
|
||||
<small>
|
||||
<i class="fa fa-info-circle me-1"/>
|
||||
<span>A credit card processing fee of </span>
|
||||
<strong id="poynt_surcharge_rate">0.00</strong>
|
||||
<span>% (<strong id="poynt_surcharge_amount">$0.00</strong>) will be added to your total.</span>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Terminal payment option -->
|
||||
<div class="mb-3 o_poynt_terminal_section" style="display:none;">
|
||||
<hr/>
|
||||
|
||||
146
fusion_poynt/views/res_config_settings_views.xml
Normal file
146
fusion_poynt/views/res_config_settings_views.xml
Normal file
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="res_config_settings_view_form_fusion_poynt" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.fusion.poynt</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//form" position="inside">
|
||||
<app data-string="Fusion Poynt" string="Fusion Poynt" name="fusion_poynt"
|
||||
groups="fusion_poynt.group_fusion_poynt_admin">
|
||||
|
||||
<h2>Credit Card Surcharge</h2>
|
||||
<div class="row mt-4 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="poynt_surcharge_enabled"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Credit Card Processing Fee</span>
|
||||
<div class="text-muted">
|
||||
Automatically add a surcharge line to invoices when collecting payment
|
||||
via Poynt. The fee is calculated as a percentage of the invoice total.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-4 o_settings_container"
|
||||
invisible="not poynt_surcharge_enabled">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Surcharge Rates by Card Type</span>
|
||||
<div class="text-muted mb-2">
|
||||
Configure the processing fee percentage for each card brand.
|
||||
The surcharge is added as a separate invoice line before payment.
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<div class="row mb-2">
|
||||
<label for="poynt_surcharge_visa_rate"
|
||||
class="col-5 col-form-label">Visa</label>
|
||||
<div class="col-4">
|
||||
<field name="poynt_surcharge_visa_rate" class="o_input"/>
|
||||
</div>
|
||||
<div class="col-1 col-form-label">%</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="poynt_surcharge_mastercard_rate"
|
||||
class="col-5 col-form-label">Mastercard</label>
|
||||
<div class="col-4">
|
||||
<field name="poynt_surcharge_mastercard_rate" class="o_input"/>
|
||||
</div>
|
||||
<div class="col-1 col-form-label">%</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="poynt_surcharge_amex_rate"
|
||||
class="col-5 col-form-label">American Express</label>
|
||||
<div class="col-4">
|
||||
<field name="poynt_surcharge_amex_rate" class="o_input"/>
|
||||
</div>
|
||||
<div class="col-1 col-form-label">%</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="poynt_surcharge_debit_rate"
|
||||
class="col-5 col-form-label">Debit</label>
|
||||
<div class="col-4">
|
||||
<field name="poynt_surcharge_debit_rate" class="o_input"/>
|
||||
</div>
|
||||
<div class="col-1 col-form-label">%</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="poynt_surcharge_other_rate"
|
||||
class="col-5 col-form-label">Other Cards</label>
|
||||
<div class="col-4">
|
||||
<field name="poynt_surcharge_other_rate" class="o_input"/>
|
||||
</div>
|
||||
<div class="col-1 col-form-label">%</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Surcharge Product</span>
|
||||
<div class="text-muted mb-2">
|
||||
The service product used for the processing fee invoice line.
|
||||
Must be a service product with no taxes applied.
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<field name="poynt_surcharge_product_id"
|
||||
domain="[('type', '=', 'service')]"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Quick Links</h2>
|
||||
<div class="row mt-4 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Payment Provider</span>
|
||||
<div class="text-muted mb-2">
|
||||
Configure your Poynt API credentials, business ID,
|
||||
and default terminal.
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<button name="action_open_poynt_provider"
|
||||
type="object"
|
||||
string="Configure Payment Provider"
|
||||
class="btn-link"
|
||||
icon="fa-arrow-right"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Terminals</span>
|
||||
<div class="text-muted mb-2">
|
||||
View and manage your Poynt terminal devices.
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<button name="action_open_poynt_terminals"
|
||||
type="object"
|
||||
string="Manage Terminals"
|
||||
class="btn-link"
|
||||
icon="fa-arrow-right"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</app>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fusion_poynt_settings" model="ir.actions.act_window">
|
||||
<field name="name">Fusion Poynt Settings</field>
|
||||
<field name="res_model">res.config.settings</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">current</field>
|
||||
<field name="context" eval="{'module': 'fusion_poynt'}"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user