company or personal
Some checks failed
CI / Check Style (push) Has been cancelled
CI / Run Clippy (push) Has been cancelled
CI / Run Tests (push) Has been cancelled

This commit is contained in:
Priec
2026-06-18 21:27:15 +02:00
parent c6624e1b3d
commit 996358be87
14 changed files with 248 additions and 3 deletions

View File

@@ -14,6 +14,11 @@ pub struct Checkout {
pub email: String,
pub phone: String,
pub customer_name: Option<String>,
pub account_type: String,
pub company_name: Option<String>,
pub company_id: Option<String>,
pub tax_id: Option<String>,
pub vat_id: Option<String>,
pub address: Option<String>,
pub city: Option<String>,
pub zip: Option<String>,
@@ -70,6 +75,11 @@ pub async fn place(ctx: &AppContext, items: &[(i32, i32)], details: Checkout) ->
status: Set("pending".to_string()),
total_cents: Set(subtotal + details.method.price_cents),
currency: Set(currency),
account_type: Set(details.account_type),
company_name: Set(details.company_name),
company_id: Set(details.company_id),
tax_id: Set(details.tax_id),
vat_id: Set(details.vat_id),
address: Set(details.address),
city: Set(details.city),
zip: Set(details.zip),