Files
Alby96andClaude Sonnet 4.6 b6b6759b9a Restyle UI to match Mago4 and add invoicing, warehouse, scadenzario
Rework the demo into a faithful Mago4 look-and-feel and expand it with
core ERP modules modelled on the real Mago4 database schema.

UI (ispirata a Mago4):
- Blue header with logo/search/operation date, desktop-style window tabs
- White sidebar with coloured module icons (Anagrafiche, Vendite, Acquisti,
  Amministrazione, Logistica)
- Card-based module landing pages with breadcrumb + tab strip
- Document detail forms with left tabs, line grid and totals box

Fatturazione (InvoiceMng / MA_SaleDoc):
- Document types (Fattura Immediata, DDT, Nota di Credito, ProForma)
- Lines with discount/IVA, automatic taxable/tax/total computation
- Document states (draft -> printed -> issued / posted_to_inventory)

Magazzino (Inventory / MA_InventoryEntries + MA_InventoryReasons):
- Inventory movements with load/unload reasons (DebitCreditSign)
- Posting a movement actually updates item balances
- Causali and stock valuation pages

Amministrazione / Scadenzario (AP_AR / MA_PyblsRcvbls):
- Open items (receivables/payables) with due date, method, state
- Settle action closes the item and recomputes the cash forecast

Dashboard riprogettata (focus su scadenze e to-do):
- Overdue alert banner, KPI for overdue payables/receivables
- Upcoming deadlines table, prioritised "Cose da fare" action list
- 30-day cash-flow forecast and customer credit-limit check

Adds REST endpoints for invoices, movements, schedules and dashboard data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 11:47:32 +02:00

105 lines
4.7 KiB
HTML

<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Mago4 Demo{% endblock %}</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="{{ url_for('static', path='/css/style.css') }}">
{% block extra_css %}{% endblock %}
</head>
<body>
<!-- Window tabs (stile desktop Mago4) -->
<div class="window-tabs">
<a href="/" class="window-tab {% if active_module == 'dashboard' %}active{% endif %}">
<i class="material-icons">home</i> Home
</a>
{% block window_tabs %}{% endblock %}
</div>
<!-- Header -->
<header class="app-header">
<button class="header-burger"><i class="material-icons">menu</i></button>
<a href="/" class="logo">
<span class="logo-mark">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M2 20 L8 4 L12 14 L16 4 L22 20 L18 20 L15 11 L12 18 L9 11 L6 20 Z" fill="#1577be"/>
<path d="M16 14 L20 14 L20 9 L22 9 L22 20 L18 20 Z" fill="#5aa632"/>
</svg>
</span>
<span class="logo-text">MAGO</span>
</a>
<div class="header-search">
<i class="material-icons">search</i>
<input type="text" placeholder="Cerca..." onkeydown="if(event.key==='Enter')globalSearch(this.value)">
</div>
<div class="header-right">
<button class="header-icon-btn" title="Lingua"><i class="material-icons">language</i></button>
<div class="header-date">
<span class="label">Data delle operazioni</span>
<span class="value">{{ operation_date }}</span>
</div>
<button class="header-icon-btn" title="Calendario"><i class="material-icons">event</i></button>
<button class="header-icon-btn" title="Profilo"><i class="material-icons">account_circle</i></button>
<button class="header-icon-btn" title="Aggiorna" onclick="location.reload()"><i class="material-icons">refresh</i></button>
</div>
</header>
<div class="app-body">
<!-- Sidebar -->
<aside class="sidebar">
<div class="sidebar-group-title">
<span class="gt-left">
<span class="gt-mark"><i class="material-icons">apps</i></span>
<span class="gt-text">Mago4</span>
</span>
<i class="material-icons chev">expand_less</i>
</div>
<a href="/" class="nav-item {% if active_module == 'dashboard' %}active{% endif %}">
<i class="material-icons ic-anagrafiche">dashboard</i> Dashboard
</a>
<a href="/anagrafiche" class="nav-item {% if active_module == 'anagrafiche' %}active{% endif %}">
<i class="material-icons ic-anagrafiche">contacts</i> Anagrafiche
</a>
<a href="/amministrazione" class="nav-item {% if active_module == 'amministrazione' %}active{% endif %}">
<i class="material-icons ic-amministrazione">account_balance</i> Amministrazione
</a>
<a href="/vendite" class="nav-item {% if active_module == 'vendite' %}active{% endif %}">
<i class="material-icons ic-vendite">point_of_sale</i> Vendite
</a>
<a href="/acquisti" class="nav-item {% if active_module == 'acquisti' %}active{% endif %}">
<i class="material-icons ic-acquisti">shopping_cart</i> Acquisti
</a>
<a href="/magazzino" class="nav-item {% if active_module == 'magazzino' %}active{% endif %}">
<i class="material-icons ic-logistica">warehouse</i> Logistica
</a>
<a href="#" class="nav-item disabled">
<i class="material-icons ic-produzione">precision_manufacturing</i> Produzione
</a>
<a href="#" class="nav-item disabled">
<i class="material-icons ic-servizi">build</i> Servizi
</a>
<a href="#" class="nav-item disabled">
<i class="material-icons ic-preferenze">settings</i> Preferenze
</a>
<div class="sidebar-sub-group">
<span>TaskBuilder Studio</span>
<i class="material-icons chev" style="font-size:16px;">expand_more</i>
</div>
</aside>
<!-- Main content -->
<main class="main">
{% block content %}{% endblock %}
</main>
</div>
<script src="{{ url_for('static', path='/js/app.js') }}"></script>
{% block extra_js %}{% endblock %}
</body>
</html>