Give the specimen invoice a placeholder in every field, not only the required ones
The footer is four columns of three lines, as designed — but the specimen only filled the fields an invoice legally needs, so two of the four columns came out empty and it read as a missing footer rather than as missing data. Reported that way, which is the correct reading of what was on the page. A specimen exists to show the layout. Every field now carries an obvious placeholder, so the shape is visible before any real detail has been entered, and what is still a placeholder is obvious at a glance. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>feat/granted-plans
parent
f8c923b48a
commit
835f3eeb64
|
|
@ -21,7 +21,28 @@ final class SampleInvoice
|
|||
{
|
||||
$issuer = CompanyProfile::all();
|
||||
|
||||
foreach (['name' => 'Ihr Firmenwortlaut e.U.', 'address' => 'Musterstraße 1', 'postcode' => '1010', 'city' => 'Wien', 'vat_id' => 'ATU00000000'] as $field => $placeholder) {
|
||||
// Every field a placeholder, not only the required ones. A specimen
|
||||
// exists to show the layout, and a footer with two of its four columns
|
||||
// empty shows a layout that is not there — the first version of this
|
||||
// was read as a missing footer rather than as missing data.
|
||||
$placeholders = [
|
||||
'name' => 'Ihr Firmenwortlaut e.U.',
|
||||
'address' => 'Musterstraße 1',
|
||||
'postcode' => '1010',
|
||||
'city' => 'Wien',
|
||||
'country' => 'Österreich',
|
||||
'phone' => '+43 000 000000',
|
||||
'email' => 'office@ihre-domain.at',
|
||||
'website' => 'www.ihre-domain.at',
|
||||
'register_number' => 'FN 000000a',
|
||||
'register_court' => 'Handelsgericht Wien',
|
||||
'vat_id' => 'ATU00000000',
|
||||
'bank_name' => 'Bank: Ihre Bank',
|
||||
'iban' => 'AT00 0000 0000 0000 0000',
|
||||
'bic' => 'BIC: XXXXATWW',
|
||||
];
|
||||
|
||||
foreach ($placeholders as $field => $placeholder) {
|
||||
if (trim((string) ($issuer[$field] ?? '')) === '') {
|
||||
$issuer[$field] = $placeholder;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue