107 lines
		
	
	
		
			4.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			107 lines
		
	
	
		
			4.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{#
 | 
						|
The Mia! Accounting Flask Project
 | 
						|
detail.html: The account detail
 | 
						|
 | 
						|
 Copyright (c) 2023 imacat.
 | 
						|
 | 
						|
 Licensed under the Apache License, Version 2.0 (the "License");
 | 
						|
 you may not use this file except in compliance with the License.
 | 
						|
 You may obtain a copy of the License at
 | 
						|
 | 
						|
     http://www.apache.org/licenses/LICENSE-2.0
 | 
						|
 | 
						|
 Unless required by applicable law or agreed to in writing, software
 | 
						|
 distributed under the License is distributed on an "AS IS" BASIS,
 | 
						|
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
						|
 See the License for the specific language governing permissions and
 | 
						|
 limitations under the License.
 | 
						|
 | 
						|
Author: imacat@mail.imacat.idv.tw (imacat)
 | 
						|
First written: 2023/1/31
 | 
						|
#}
 | 
						|
{% extends "accounting/base.html" %}
 | 
						|
 | 
						|
{% block header %}{% block title %}{{ obj }}{% endblock %}{% endblock %}
 | 
						|
 | 
						|
{% block content %}
 | 
						|
 | 
						|
<div class="mb-3 accounting-toolbar">
 | 
						|
  <a class="btn btn-primary" role="button" href="{{ url_for("accounting.account.list")|accounting_or_next }}">
 | 
						|
    <i class="fa-solid fa-circle-chevron-left"></i>
 | 
						|
    <span class="d-none d-md-inline">{{ A_("Back") }}</span>
 | 
						|
  </a>
 | 
						|
  {% if accounting_can_edit() %}
 | 
						|
    <a class="btn btn-primary d-none d-md-inline" role="button" href="{{ url_for("accounting.account.edit", account=obj)|accounting_inherit_next }}">
 | 
						|
      <i class="fa-solid fa-pen-to-square"></i>
 | 
						|
      {{ A_("Edit") }}
 | 
						|
    </a>
 | 
						|
  {% endif %}
 | 
						|
  <a class="btn btn-primary" role="button" href="{{ url_for("accounting.account.order", base=obj.base)|accounting_append_next }}">
 | 
						|
    <i class="fa-solid fa-bars-staggered"></i>
 | 
						|
    <span class="d-none d-md-inline">{{ A_("Order") }}</span>
 | 
						|
  </a>
 | 
						|
  {% if accounting_can_edit() %}
 | 
						|
    {% if obj.can_delete %}
 | 
						|
      <button class="btn btn-danger" type="button" data-bs-toggle="modal" data-bs-target="#accounting-delete-modal">
 | 
						|
        <i class="fa-solid fa-trash"></i>
 | 
						|
        <span class="d-none d-md-inline">{{ A_("Delete") }}</span>
 | 
						|
      </button>
 | 
						|
    {% else %}
 | 
						|
      <button class="btn btn-secondary" type="button" disabled="disabled">
 | 
						|
        <i class="fa-solid fa-trash"></i>
 | 
						|
        <span class="d-none d-md-inline">{{ A_("Delete") }}</span>
 | 
						|
      </button>
 | 
						|
    {% endif %}
 | 
						|
  {% endif %}
 | 
						|
</div>
 | 
						|
 | 
						|
{% if accounting_can_edit() %}
 | 
						|
  <div class="d-md-none accounting-material-fab">
 | 
						|
    <a class="btn btn-primary" role="button" href="{{ url_for("accounting.account.edit", account=obj)|accounting_inherit_next }}">
 | 
						|
      <i class="fa-solid fa-pen-to-square"></i>
 | 
						|
    </a>
 | 
						|
  </div>
 | 
						|
{% endif %}
 | 
						|
 | 
						|
{% if accounting_can_edit() and obj.can_delete %}
 | 
						|
  <form action="{{ url_for("accounting.account.delete", account=obj) }}" method="post">
 | 
						|
    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
 | 
						|
    {% if request.args.next %}
 | 
						|
      <input type="hidden" name="next" value="{{ request.args.next }}">
 | 
						|
    {% endif %}
 | 
						|
    <div class="modal fade" id="accounting-delete-modal" tabindex="-1" aria-labelledby="accounting-delete-modal-label" aria-hidden="true">
 | 
						|
      <div class="modal-dialog">
 | 
						|
        <div class="modal-content">
 | 
						|
          <div class="modal-header">
 | 
						|
            <h1 class="modal-title fs-5" id="accounting-delete-modal-label">{{ A_("Confirm Delete Account") }}</h1>
 | 
						|
            <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ A_("Close") }}"></button>
 | 
						|
          </div>
 | 
						|
          <div class="modal-body">
 | 
						|
            {{ A_("Do you really want to delete this account?") }}
 | 
						|
          </div>
 | 
						|
          <div class="modal-footer">
 | 
						|
            <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ A_("Cancel") }}</button>
 | 
						|
            <button type="submit" class="btn btn-danger">{{ A_("Confirm") }}</button>
 | 
						|
          </div>
 | 
						|
        </div>
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
  </form>
 | 
						|
{% endif %}
 | 
						|
 | 
						|
<div class="accounting-card col-sm-6">
 | 
						|
  <div class="accounting-card-title">{{ obj.title|title }}</div>
 | 
						|
  <div class="accounting-card-code">{{ obj.code }}</div>
 | 
						|
  {% if obj.is_need_offset %}
 | 
						|
    <div>
 | 
						|
      <span class="badge rounded-pill bg-info">{{ A_("Needs Offset") }}</span>
 | 
						|
    </div>
 | 
						|
  {% endif %}
 | 
						|
  <div class="small text-secondary fst-italic">
 | 
						|
    <div>{{ A_("Created") }} {{ obj.created_at }} {{ obj.created_by }}</div>
 | 
						|
    <div>{{ A_("Updated") }} {{ obj.updated_at }} {{ obj.updated_by }}</div>
 | 
						|
  </div>
 | 
						|
</div>
 | 
						|
 | 
						|
{% endblock %}
 |