Invoices: alanyi adómentes (AAM) by default
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:
@@ -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(),
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user