Customer page and contacts/billing units (phase 1, item 2): - New customer page (customers.show) with details, contacts and billing units; add and edit on their own pages, delete after confirmation. Creating or editing a customer now leads to this page. - Contacts: name, title, phone, email, note. Billing units: name, billing address, e-invoice address (12-35 letters/digits), operator (required with an e-invoice address) and reference. - Use cases check that the row belongs to the customer, so ids in the URL can't reach another customer's rows. - EmailAddress moves from Users to Shared so both modules can use it. - <x-confirm-dialog> (native <dialog>) replaces <x-modal>, whose title, close button and focus handling are not accessible; solid red buttons use red-700 via published NormalButtonColors for 4.5:1 contrast. Personal identity code (henkilötunnus) for consumers who are invoiced: - Validated (date, century sign, check character), stored encrypted with an HMAC blind index for duplicate checks; never in CustomerSummary, search, logs or Livewire state. - Admins and management see it in full and may remove it; others enter it and see only the masked form. The form never shows the stored code. Spec, architecture doc and CLAUDE.md updated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
114 lines
5.5 KiB
PHP
114 lines
5.5 KiB
PHP
<?php
|
||
|
||
return [
|
||
'title' => 'Asiakkaat',
|
||
'create_title' => 'Uusi asiakas',
|
||
'edit_title' => 'Muokkaa asiakasta',
|
||
|
||
'new' => 'Uusi asiakas',
|
||
'edit' => 'Muokkaa',
|
||
'actions' => 'Toiminnot',
|
||
'save' => 'Tallenna',
|
||
'cancel' => 'Peruuta',
|
||
'search' => 'Hae asiakasta',
|
||
'search_description' => 'Hae nimellä tai Y-tunnuksella.',
|
||
'empty' => 'Asiakkaita ei löytynyt.',
|
||
'result_count' => '{0} Ei asiakkaita|{1} :count asiakas|[2,*] :count asiakasta',
|
||
|
||
'created' => 'Asiakas :name lisätty. Voit nyt lisätä yhteyshenkilöt ja laskutusyksiköt.',
|
||
'updated' => 'Asiakkaan :name tiedot tallennettu.',
|
||
'edit_details' => 'Muokkaa tietoja',
|
||
'remove' => 'Poista',
|
||
'customer_label' => 'Asiakas',
|
||
|
||
'contacts' => [
|
||
'title' => 'Yhteyshenkilöt',
|
||
'new' => 'Lisää yhteyshenkilö',
|
||
'empty' => 'Asiakkaalle ei ole vielä lisätty yhteyshenkilöitä.',
|
||
'create_title' => 'Uusi yhteyshenkilö',
|
||
'edit_title' => 'Muokkaa yhteyshenkilöä',
|
||
'edit_named' => 'Muokkaa yhteyshenkilöä :name',
|
||
'remove_named' => 'Poista yhteyshenkilö :name',
|
||
'created' => 'Yhteyshenkilö :name lisätty.',
|
||
'updated' => 'Yhteyshenkilön :name tiedot tallennettu.',
|
||
'fields' => [
|
||
'name' => 'Nimi',
|
||
'title' => 'Titteli tai rooli',
|
||
'title_description' => 'Esimerkiksi markkinointipäällikkö tai laskujen hyväksyjä.',
|
||
'phone' => 'Puhelin',
|
||
'email' => 'Sähköposti',
|
||
'note' => 'Lisätieto',
|
||
],
|
||
],
|
||
|
||
'billing_units' => [
|
||
'title' => 'Laskutusyksiköt',
|
||
'new' => 'Lisää laskutusyksikkö',
|
||
'empty' => 'Asiakkaalle ei ole vielä lisätty laskutusyksiköitä.',
|
||
'create_title' => 'Uusi laskutusyksikkö',
|
||
'edit_title' => 'Muokkaa laskutusyksikköä',
|
||
'edit_named' => 'Muokkaa laskutusyksikköä :name',
|
||
'remove_named' => 'Poista laskutusyksikkö :name',
|
||
'created' => 'Laskutusyksikkö :name lisätty.',
|
||
'updated' => 'Laskutusyksikön :name tiedot tallennettu.',
|
||
'fields' => [
|
||
'name' => 'Nimi',
|
||
'name_description' => 'Jokainen laskutusyksikkö saa omat laskunsa.',
|
||
'billing_address' => 'Laskutusosoite',
|
||
'billing_address_description' => 'Postiosoite paperilaskulle tai laskutussähköposti.',
|
||
'e_invoice_address' => 'Verkkolaskuosoite',
|
||
'e_invoice_address_description' => 'Esimerkiksi OVT-tunnus 003712345678. Ei pakollinen.',
|
||
'e_invoice_operator' => 'Välittäjätunnus',
|
||
'e_invoice_operator_description' => 'Verkkolaskuoperaattorin tunnus, esimerkiksi 003721291126. Pakollinen, jos verkkolaskuosoite on annettu.',
|
||
'reference' => 'Viite',
|
||
'reference_description' => 'Asiakkaan pyytämä viite, joka tulostuu laskulle.',
|
||
],
|
||
],
|
||
|
||
'removal' => [
|
||
'title' => 'Vahvista poisto',
|
||
'question_contact' => 'Poistetaanko yhteyshenkilö :name? Poistoa ei voi perua.',
|
||
'question_billing_unit' => 'Poistetaanko laskutusyksikkö :name? Poistoa ei voi perua.',
|
||
'removed_contact' => 'Yhteyshenkilö :name poistettu.',
|
||
'removed_billing_unit' => 'Laskutusyksikkö :name poistettu.',
|
||
'already_removed' => 'Riviä ei löytynyt. Se on ehkä jo poistettu.',
|
||
],
|
||
|
||
'fields' => [
|
||
'name' => 'Nimi',
|
||
'type' => 'Asiakastyyppi',
|
||
'business_id' => 'Y-tunnus',
|
||
'business_id_description' => 'Muodossa 1234567-8. Ei pakollinen.',
|
||
'personal_identity_code' => 'Henkilötunnus',
|
||
'personal_identity_code_description' => 'Tarvitaan, kun kuluttajalle lähetetään lasku. Muodossa 131052-308T. Ei pakollinen.',
|
||
'personal_identity_code_stored' => 'Tallennettu: :code. Jätä tyhjäksi, jos et muuta sitä.',
|
||
'personal_identity_code_missing' => 'Ei annettu – tarvitaan laskutukseen',
|
||
'remove_personal_identity_code' => 'Poista tallennettu henkilötunnus',
|
||
],
|
||
|
||
'types' => [
|
||
'company' => 'Yritys',
|
||
'consumer' => 'Kuluttaja',
|
||
],
|
||
|
||
'errors' => [
|
||
'name_required' => 'Anna asiakkaan nimi.',
|
||
'invalid_name' => 'Nimen pituus voi olla enintään 255 merkkiä.',
|
||
'type_required' => 'Valitse asiakastyyppi.',
|
||
'invalid_business_id' => 'Y-tunnus ei ole kelvollinen. Tarkista numerot ja muoto 1234567-8.',
|
||
'consumer_business_id' => 'Kuluttaja-asiakkaalla ei voi olla Y-tunnusta.',
|
||
'business_id_taken' => 'Tällä Y-tunnuksella on jo asiakas.',
|
||
'invalid_personal_identity_code' => 'Henkilötunnus ei ole kelvollinen. Tarkista päivämäärä, välimerkki ja tarkistusmerkki, esimerkiksi 131052-308T.',
|
||
'company_personal_identity_code' => 'Yritysasiakkaalla ei voi olla henkilötunnusta.',
|
||
'personal_identity_code_taken' => 'Tällä henkilötunnuksella on jo asiakas. Hae asiakas listasta nimellä.',
|
||
'contact_name_required' => 'Anna yhteyshenkilön nimi.',
|
||
'invalid_contact_name' => 'Nimen pituus voi olla enintään 255 merkkiä.',
|
||
'invalid_email' => 'Sähköpostiosoite ei ole kelvollinen.',
|
||
'billing_unit_name_required' => 'Anna laskutusyksikön nimi.',
|
||
'invalid_billing_unit_name' => 'Nimen pituus voi olla enintään 255 merkkiä.',
|
||
'invalid_e_invoice_address' => 'Verkkolaskuosoitteessa on oltava 12–35 kirjainta tai numeroa, esimerkiksi 003712345678.',
|
||
'e_invoice_operator_required' => 'Anna välittäjätunnus, koska verkkolaskuosoite on annettu.',
|
||
'too_long' => 'Teksti voi olla enintään :max merkkiä.',
|
||
],
|
||
];
|