Revision f0a359a2
Von Tamino Steinert vor 11 Monaten hinzugefügt
SL/Controller/EmailJournal.pm | ||
---|---|---|
20 | 20 |
use SL::DB::Reclamation; |
21 | 21 |
use SL::DB::Reclamation::TypeData; |
22 | 22 |
use SL::DB::Invoice; |
23 |
use SL::DB::Invoice::TypeData; |
|
23 | 24 |
use SL::DB::PurchaseInvoice; |
25 |
use SL::DB::PurchaseInvoice::TypeData; |
|
24 | 26 |
|
25 | 27 |
use SL::DB::Manager::Customer; |
26 | 28 |
use SL::DB::Manager::Vendor; |
... | ... | |
69 | 71 |
Invoice => { |
70 | 72 |
controller => 'is.pl', |
71 | 73 |
class => 'Invoice', |
72 |
types => [ |
|
73 |
'invoice', |
|
74 |
'invoice_for_advance_payment', |
|
75 |
'invoice_for_advance_payment_storno', |
|
76 |
'final_invoice', |
|
77 |
'invoice_storno', |
|
78 |
'credit_note', |
|
79 |
'credit_note_storno', |
|
80 |
], |
|
74 |
types => SL::DB::Invoice::TypeData->valid_types(), |
|
81 | 75 |
}, |
82 | 76 |
ApTransaction => { |
83 | 77 |
controller => 'ap.pl', |
... | ... | |
89 | 83 |
PurchaseInvoice => { |
90 | 84 |
controller => 'ir.pl', |
91 | 85 |
class => 'PurchaseInvoice', |
92 |
types => [ |
|
93 |
'purchase_invoice', |
|
94 |
'purchase_credit_note', |
|
95 |
], |
|
86 |
types => SL::DB::PurchaseInvoice::TypeData->valid_types(), |
|
96 | 87 |
}, |
97 | 88 |
GlRecordTemplate => { |
98 | 89 |
controller => 'gl.pl', |
... | ... | |
150 | 141 |
|
151 | 142 |
# has do be done at runtime for translation to work |
152 | 143 |
sub get_record_types_with_info { |
153 |
# TODO: what record types can be created, which are only available in workflows? |
|
154 | 144 |
my @record_types_with_info = (); |
155 |
for my $record_class ('SL::DB::Order', 'SL::DB::DeliveryOrder', 'SL::DB::Reclamation') { |
|
145 |
for my $record_class ( |
|
146 |
'SL::DB::Order', 'SL::DB::DeliveryOrder', 'SL::DB::Reclamation', |
|
147 |
'SL::DB::Invoice', 'SL::DB::PurchaseInvoice', |
|
148 |
) { |
|
156 | 149 |
my $type_data = "${record_class}::TypeData"; |
157 | 150 |
my $valid_types = $type_data->valid_types(); |
158 | 151 |
for my $type (@$valid_types) { |
... | ... | |
170 | 163 |
} |
171 | 164 |
} |
172 | 165 |
push @record_types_with_info, ( |
173 |
# invoice |
|
174 |
{ record_type => 'invoice', customervendor => 'customer', workflow_needed => 0, can_workflow => 1, text => t8('Invoice') }, |
|
175 |
{ record_type => 'invoice_for_advance_payment', customervendor => 'customer', workflow_needed => 0, can_workflow => 1, text => t8('Invoice for Advance Payment')}, |
|
176 |
{ record_type => 'invoice_for_advance_payment_storno', customervendor => 'customer', workflow_needed => 1, can_workflow => 1, text => t8('Storno Invoice for Advance Payment')}, |
|
177 |
{ record_type => 'final_invoice', customervendor => 'customer', workflow_needed => 1, can_workflow => 1, text => t8('Final Invoice')}, |
|
178 |
{ record_type => 'invoice_storno', customervendor => 'customer', workflow_needed => 1, can_workflow => 1, text => t8('Storno Invoice')}, |
|
179 |
{ record_type => 'credit_note', customervendor => 'customer', workflow_needed => 0, can_workflow => 1, text => t8('Credit Note')}, |
|
180 |
{ record_type => 'credit_note_storno', customervendor => 'customer', workflow_needed => 1, can_workflow => 1, text => t8('Storno Credit Note')}, |
|
181 |
# purchase invoice |
|
182 |
{ record_type => 'purchase_invoice', customervendor => 'vendor', workflow_needed => 0, can_workflow => 1, text => t8('Purchase Invoice')}, |
|
183 |
{ record_type => 'purchase_credit_note', customervendor => 'vendor', workflow_needed => 0, can_workflow => 1, text => t8('Purchase Credit Note')}, |
|
184 | 166 |
# transactions |
185 | 167 |
# gl_transaction can be for vendor and customer |
186 | 168 |
{ record_type => 'gl_transaction', customervendor => 'customer', workflow_needed => 0, can_workflow => 1, text => t8('GL Transaction')}, |
Auch abrufbar als: Unified diff
Typedata für Invoice und PurchaseInvoice