dbxapp 4.1.3
CMS, Shop, Workflows und modulare Geschäftsanwendungen
Loading...
Searching...
No Matches
invoice-form_en.fd.php
Go to the documentation of this file.
1<?php
2$messages = array();
3$messages['save_success'] = 'Data was saved';
4$messages['save_succeass'] = $messages['save_success'];
5$messages['save_error'] = 'Data could not be saved';
6$messages['form_info'] = 'Review and save the invoice header.';
7$messages['form_title_new'] = 'New invoice';
8$messages['form_title_edit'] = 'Edit invoice';
9$messages['help_title'] = 'Invoice form';
10$messages['not_found'] = 'Invoice not found.';
11$messages['validation_error'] = 'Please check your entries.';
12
16
17$fields = array();
18
19$addField = function (
20 string $name,
21 string $type,
22 string $tpl,
23 string $label,
24 string $rules,
25 array $extra = array()
26) use (&$fields): void {
27 $field = array();
28 $field['name'] = $name;
29 $field['type'] = $type;
30 $field['index'] = '';
31 $field['length'] = $extra['length'] ?? '';
32 $field['default'] = $extra['default'] ?? '';
33 $field['label'] = $label;
34 $field['rules'] = $rules;
35 $field['tooltip'] = $extra['tooltip'] ?? '';
36 $field['errormsg'] = $extra['errormsg'] ?? '';
37 $field['placeholder'] = $extra['placeholder'] ?? '';
38 $field['convert'] = $extra['convert'] ?? '';
39 $field['protect'] = '0';
40 $field['mask'] = '';
41 $field['data'] = $extra['data'] ?? '';
42 $field['options'] = $extra['options'] ?? '';
43 $field['tpl'] = $tpl;
44 $fields[] = $field;
45};
46
48 'invoice_no',
49 'varchar',
50 'text-label',
51 'Invoice number',
52 'parameter|min=2|max=40',
53 array('length' => '40')
54);
56 'invoice_date',
57 'date',
58 'date-label',
59 'Invoice date',
60 'date',
61 array('convert' => 'date')
62);
64 'customer',
65 'varchar',
66 'text-label',
67 'Customer',
68 '*|min=2|max=180',
69 array('length' => '180')
70);
72 'status',
73 'varchar',
74 'select-single-label',
75 'Status',
76 'parameter|max=24',
77 array(
78 'length' => '24',
79 'default' => 'draft',
80 'options' => 'draft=Draft&open=Open&paid=Paid',
81 )
82);
83
84?>
$messages
Definition config.fd.php:2
if($web->content_permalink_redirect_target() !=='') $tpl