Invoices: alanyi adómentes (AAM) by default
CI / test (push) Successful in 1m29s
CI / build (push) Successful in 5m57s
CI / deploy (push) Skipped

INVOICE_VAT picks the VAT of the invoices: AAM (no VAT, net = gross, the
invoice says so) or a rate like 27% once the exemption limit is passed.
The packages page tells which.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-20 08:03:04 +00:00
co-authored by Claude Opus 5.5
parent 2a0830fda0
commit 4338a35202
14 changed files with 90 additions and 27 deletions
+2
View File
@@ -173,6 +173,8 @@ async fn public_config(State(state): St) -> Json<Value> {
"payments": payments::method(c),
"payments_admins_only": payments::admins_only(c),
"payments_test": c.stripe.as_ref().is_some_and(|s| s.test_mode()),
// "AAM" (alanyi adómentes: the prices carry no VAT) or a rate like "27%".
"vat": c.invoice_vat.code(),
"user_invites": c.user_invites,
"referral_rewards": c.referral_rewards,
"signup_mode": c.signup_mode.as_str(),
+2 -1
View File
@@ -207,7 +207,8 @@ async fn complete(state: &AppState, session: &stripe::Session) -> Result<bool, A
.await?;
let buyer = invoices::Buyer::from_stripe(session.customer_details.as_ref().unwrap_or(&Value::Null), None);
let item = format!("Sorsfonalak – {}", package.name);
invoices::queue(&mut tx, &session.id, user_id, &buyer, &item, amount_huf.unwrap_or(i64::from(price_huf))).await?;
let gross = amount_huf.unwrap_or(i64::from(price_huf));
invoices::queue(&mut tx, &session.id, user_id, &buyer, &item, gross, state.config.invoice_vat).await?;
tx.commit().await?;
tracing::info!(user = ?user_id, package = %package_id, session = %session.id, "package paid");
Ok(true)