-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
EDocRules.php
103 lines (97 loc) · 2.98 KB
/
EDocRules.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataProviders;
class EDocRules
{
// [
// "key" => "",
// "label" => "",
// "type" => "dropdown/date/string/text",
// "resource" => "resource.json",
// "required" => true,
// ]
public function rules()
{
return [
'FatturaPA' => $this->FatturaPADefaults(),
];
}
private function FatturaPADefaults()
{
return [
[
"key" => "RegimeFiscale",
"label" => "Regime Fiscale",
"type" => "dropdown",
"resource" => "RegimeFiscale.json",
"required" => true,
],
[
"key" => "TipoDocumento",
"label" => "Tipo Documento",
"type" => "dropdown",
"resource" => "TipoDocumento.json",
"required" => true,
],
[
"key" => "ModalitaPagamento",
"label" => "Modalita Pagamento",
"type" => "dropdown",
"resource" => "ModalitaPagamento.json",
"required" => true,
],
[
"key" => "CondizioniPagamento",
"label" => "Condizioni Pagamento",
"type" => "dropdown",
"resource" => "CondizioniPagamento.json",
"required" => true,
],
[
"key" => "DatiRicezione",
"label" => "Dati Ricezione",
"type" => "dropdown",
"resource" => "CondizioniPagamento",
"required" => false,
"children" => [],
],
[
"key" => "DatiContratto",
"label" => "Dati Contratto",
"type" => "object",
"resource" => "DatiContratto",
"required" => false,
"children" => [
[
"key"=> "RiferimentoNumeroLinea",
"validation" => [
"string","min:1","max:10","required"
],
]
],
],
[
"key" => "DatiOrdineAcquisto",
"label" => "Dati Ordine Acquisto",
"type" => "object",
"resource" => "DatiOrdineAcquisto",
"required" => false,
],
[
"key" => "DatiAnagraficiVettore",
"label" => "Dati Anagrafici Vettore",
"type" => "object",
"resource" => "DatiAnagraficiVettore",
"required" => false,
],
];
}
}