commit initial

This commit is contained in:
2025-08-13 22:47:45 +03:00
commit 8d0eaf7af1
146 changed files with 19138 additions and 0 deletions

View File

@@ -0,0 +1,242 @@
<!DOCTYPE html>
<html lang="ro">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Editor Factură Electronică</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pikaday/1.8.0/css/pikaday.min.css">
<link rel="stylesheet" href="./styles/main.css">
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
</head>
</head>
<body>
<div class="container">
<div class="header">
<div>
<h1>Editor eFactura</h1>
<div class="app-author">Romfast SRL</div>
</div>
<div class="button-group">
<input type="file" id="fileInput" class="file-input" accept=".xml">
<button onclick="document.getElementById('fileInput').click()" class="button">Alege Fișier XML</button>
<button onclick="handleStorno()" class="button button-danger">Stornează</button>
<button onclick="saveXML()" class="button button-secondary">Salvează XML</button>
</div>
</div>
<form id="invoiceForm">
<!-- Details Grid -->
<div class="details-grid">
<!-- Invoice Details -->
<div class="form-section invoice-details">
<h2 class="section-title">Detalii Factură</h2>
<div class="compact-grid">
<div class="form-group">
<label class="form-label">Număr Factură</label>
<input type="text" class="form-input" name="invoiceNumber">
</div>
<div class="form-group">
<label class="form-label">Data Emiterii</label>
<div class="date-input-container">
<input type="text" class="form-input date-input" name="issueDate" placeholder="dd.mm.yyyy" maxlength="10" pattern="\d{2}.\d{2}.\d{4}">
<button type="button" class="calendar-button" tabindex="-1">📅</button>
</div>
</div>
<div class="form-group">
<label class="form-label">Data Scadentă</label>
<div class="date-input-container">
<input type="text" class="form-input date-input" name="dueDate" placeholder="dd.mm.yyyy" maxlength="10" pattern="\d{2}.\d{2}.\d{4}">
<button type="button" class="calendar-button" tabindex="-1">📅</button>
</div>
</div>
<div class="form-group">
<label class="form-label">Monedă Factură</label>
<input type="text" class="form-input" name="documentCurrencyCode" value="RON" maxlength="3">
</div>
<div class="form-group">
<label class="form-label">Monedă TVA (opțional)</label>
<input type="text" class="form-input" name="taxCurrencyCode" maxlength="3">
</div>
</div>
</div>
<!-- Supplier Details -->
<div class="form-section party-details">
<h2 class="section-title">Detalii Furnizor</h2>
<div class="compact-grid">
<div class="form-group">
<label class="form-label">Nume</label>
<input type="text" class="form-input" name="supplierName">
</div>
<div class="form-group">
<label class="form-label">Cod TVA</label>
<input type="text" class="form-input" name="supplierVAT">
</div>
<div class="form-group">
<label class="form-label">Nr. înregistrare</label>
<input type="text" class="form-input" name="supplierCompanyId">
</div>
<div class="form-group">
<label class="form-label">Adresă</label>
<input type="text" class="form-input" name="supplierAddress">
</div>
<div class="form-group">
<label class="form-label">Oraș</label>
<input type="text" class="form-input" name="supplierCity">
</div>
<div class="form-group">
<label class="form-label">Județ</label>
<input type="text" class="form-input" name="supplierCountrySubentity">
</div>
<div class="form-group">
<label class="form-label">Țară</label>
<input type="text" class="form-input" name="supplierCountry">
</div>
<div class="form-group">
<label class="form-label">Telefon</label>
<input type="tel" class="form-input" name="supplierPhone" pattern="[0-9]*">
</div>
<div class="form-group">
<label class="form-label">Persoană Contact</label>
<input type="text" class="form-input" name="supplierContactName">
</div>
<div class="form-group">
<label class="form-label">Email</label>
<input type="email" class="form-input" name="supplierEmail">
</div>
</div>
</div>
<!-- Customer Details -->
<div class="form-section party-details">
<h2 class="section-title">Detalii Client</h2>
<div class="compact-grid">
<div class="form-group">
<label class="form-label">Nume</label>
<input type="text" class="form-input" name="customerName">
</div>
<div class="form-group">
<label class="form-label">Cod TVA</label>
<input type="text" class="form-input" name="customerVAT">
</div>
<div class="form-group">
<label class="form-label">Nr. înregistrare</label>
<input type="text" class="form-input" name="customerCompanyId">
</div>
<div class="form-group">
<label class="form-label">Adresă</label>
<input type="text" class="form-input" name="customerAddress">
</div>
<div class="form-group">
<label class="form-label">Oraș</label>
<input type="text" class="form-input" name="customerCity">
</div>
<div class="form-group">
<label class="form-label">Județ</label>
<input type="text" class="form-input" name="customerCountrySubentity">
</div>
<div class="form-group">
<label class="form-label">Țară</label>
<input type="text" class="form-input" name="customerCountry">
</div>
<div class="form-group">
<label class="form-label">Telefon</label>
<input type="tel" class="form-input" name="customerPhone" pattern="[0-9]*">
</div>
<div class="form-group">
<label class="form-label">Persoană Contact</label>
<input type="text" class="form-input" name="customerContactName">
</div>
<div class="form-group">
<label class="form-label">Email</label>
<input type="email" class="form-input" name="customerEmail">
</div>
</div>
</div>
</div>
<!-- Note field -->
<div class="form-section">
<h2 class="section-title">Text Adițional</h2>
<div class="form-group">
<textarea class="form-input note-input" name="invoiceNote" rows="4" maxlength="900"></textarea>
<div class="note-counter">0/900 caractere</div>
</div>
</div>
<!-- Allowances and Charges -->
<div class="allowance-charges" id="allowanceCharges">
<h2 class="section-title">
Reduceri și Taxe Suplimentare
<button type="button" class="button button-small" onclick="addAllowanceCharge()">
Adaugă Reducere/Taxă
</button>
</h2>
</div>
<!-- Line Items -->
<div class="line-items" id="lineItems">
<h2 class="section-title">
Articole Factură
<button type="button" class="button button-small" onclick="addLineItem()">
Adaugă Articol
</button>
</h2>
</div>
<!-- Totals Section -->
<div class="totals">
<div class="total-row">
<span>Subtotal:</span>
<span id="subtotal" class="editable-total">0.00</span>
</div>
<div class="total-row">
<span>Total Reduceri:</span>
<span id="totalAllowances" class="editable-total">0.00</span>
</div>
<div class="total-row">
<span>Total Taxe:</span>
<span id="totalCharges" class="editable-total">0.00</span>
</div>
<div class="total-row">
<span>Valoare Netă:</span>
<span id="netAmount" class="editable-total">0.00</span>
</div>
<!-- VAT Breakdown -->
<div id="vatBreakdown">
<h3 class="section-title">Defalcare TVA</h3>
<div id="vatBreakdownRows"></div>
<button type="button" class="button button-small" onclick="window.addVATRate()">
Adaugă Cotă TVA
</button>
<div class="vat-total-group">
<div class="total-row">
<span>Total TVA:</span>
<span id="vat" class="editable-total">0.00</span>
</div>
</div>
</div>
<div class="total-row total-row-final">
<span>Total:</span>
<span id="total" class="editable-total">0.00</span>
</div>
<div class="total-row">
<button type="button" class="button" onclick="refreshTotals()">Recalculează Totaluri</button>
</div>
</div>
</form>
<footer class="app-footer">
<span id="app-version">v0.9-beta-4</span>
<a href="https://www.romfast.ro">www.romfast.ro</a>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pikaday/1.8.0/pikaday.min.js"></script>
<script type="module" src="./js/script.js"></script>
</body>
</html>