Billing Entity Management #66
1 changed files with 70 additions and 26 deletions
|
@ -5,31 +5,75 @@
|
|||
{% translate "Create a new organization" %}
|
||||
{% endblock page_title %}
|
||||
{% endblock html_title %}
|
||||
{% block card_content %}
|
||||
<form method="post" class="form form-vertical">
|
||||
{% include "frontend/forms/errors.html" %}
|
||||
{% csrf_token %}
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
{{ form.name.as_field_group }}
|
||||
<hr class="my-4">
|
||||
<h4>{% translate "Billing Information" %}</h4>
|
||||
{{ form.billing_processing_choice.as_field_group }}
|
||||
<div id="existing_billing_address_section" class="mt-3">{{ form.existing_odoo_address_id.as_field_group }}</div>
|
||||
<div id="new_billing_address_section" class="mt-3">
|
||||
{{ form.invoice_name.as_field_group }}
|
||||
{{ form.invoice_street.as_field_group }}
|
||||
{{ form.invoice_street2.as_field_group }}
|
||||
{{ form.invoice_city.as_field_group }}
|
||||
{{ form.invoice_zip.as_field_group }}
|
||||
{{ form.invoice_state_name.as_field_group }}
|
||||
{{ form.invoice_country.as_field_group }}
|
||||
{{ form.invoice_email.as_field_group }}
|
||||
{{ form.invoice_phone.as_field_group }}
|
||||
{{ form.invoice_vat.as_field_group }}
|
||||
{% block content %}
|
||||
<section class="section">
|
||||
<form method="post" class="form form-vertical">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="form-body card-body">
|
||||
<div class="row">
|
||||
{% include "frontend/forms/errors.html" %}
|
||||
{% csrf_token %}
|
||||
{{ form.name.as_field_group }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 d-flex justify-content-end">
|
||||
<button class="btn btn-primary me-1 mb-1" type="submit">{% translate "Create Organization" %}</button>
|
||||
</div>
|
||||
{% if form.existing_odoo_address_id and form.existing_odoo_address_id.choices %}
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="card-header">
|
||||
<h4 class="card-title">{% translate "Billing Information" %}</h4>
|
||||
</div>
|
||||
<div class="form-body card-body">
|
||||
<div class="row">
|
||||
{{ form.billing_processing_choice.as_field_group }}
|
||||
<div id="existing_billing_address_section" class="mt-3">{{ form.existing_odoo_address_id.as_field_group }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="new_billing_address_section">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="card-header">
|
||||
<h4 class="card-title">{% translate "Invoice Address" %}</h4>
|
||||
</div>
|
||||
<div class="form-body card-body">
|
||||
<div class="row">
|
||||
{{ form.invoice_vat.as_field_group }}
|
||||
<hr>
|
||||
{{ form.invoice_street.as_field_group }}
|
||||
{{ form.invoice_street2.as_field_group }}
|
||||
<div class="col-md-2">{{ form.invoice_zip.as_field_group }}</div>
|
||||
<div class="col-md-10">{{ form.invoice_city.as_field_group }}</div>
|
||||
{{ form.invoice_country.as_field_group }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="card-header">
|
||||
<h4 class="card-title">{% translate "Invoice Contact" %}</h4>
|
||||
</div>
|
||||
<div class="form-body card-body">
|
||||
<div class="row">
|
||||
{{ form.invoice_email.as_field_group }}
|
||||
{{ form.invoice_phone.as_field_group }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="card-body">
|
||||
<div class="col-sm-12 d-flex justify-content-end">
|
||||
<button class="btn btn-primary me-1 mb-1" type="submit">{% translate "Create Organization" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -65,8 +109,8 @@
|
|||
} else {
|
||||
// No existing addresses found, a new address has to be entered.
|
||||
if (existingSection) existingSection.style.display = 'none'
|
||||
newSection.style.display = ''
|
||||
if (newSection) newSection.style.display = '' // Ensure newSection is not null
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock card_content %}
|
||||
{% endblock content %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue