'purchase_invoice' => { gen => 6, gltype => 'ap', dir =>'PurchaseInvoice', model => 'PurchaseInvoice',right => 'import_ap' },
'vendor' => { gen => 0, gltype => '', dir =>'Vendor', model => 'Vendor', right => 'xx' },
'customer' => { gen => 1, gltype => '', dir =>'Customer', model => 'Customer', right => 'xx' },
+ 'project' => { gen => 0, gltype => '', dir =>'Project', model => 'Project', right => 'xx' },
'part' => { gen => 0, gltype => '', dir =>'Part', model => 'Part', right => 'xx' },
'gl_transaction' => { gen => 6, gltype => 'gl', dir =>'GeneralLedger', model => 'GLTransaction', right => 'import_ap' },
'draft' => { gen => 0, gltype => '', dir =>'Draft', model => 'Draft', right => 'xx' },
CVar->render_inputs(variables => $params{CUSTOM_VARIABLES}) if @{ $params{CUSTOM_VARIABLES} };
+ $::request->layout->use_javascript('kivi.File.js');
$self->setup_edit_action_bar(callback => $params{callback});
$self->render('project/form', %params);
--- /dev/null
+-- @tag: file_storage_project
+-- @description: Dateispeicher auch für Projekte anbieten
+-- @depends: file_storage_dunning_invoice
+
+ALTER TABLE files
+ DROP CONSTRAINT valid_type;
+ALTER TABLE files
+ ADD CONSTRAINT valid_type CHECK (
+ (object_type = 'credit_note' ) OR (object_type = 'invoice' ) OR (object_type = 'sales_order' )
+ OR (object_type = 'sales_quotation' ) OR (object_type = 'sales_delivery_order' ) OR (object_type = 'request_quotation' )
+ OR (object_type = 'purchase_order' ) OR (object_type = 'purchase_delivery_order' ) OR (object_type = 'purchase_invoice' )
+ OR (object_type = 'vendor' ) OR (object_type = 'customer' ) OR (object_type = 'part' )
+ OR (object_type = 'gl_transaction' ) OR (object_type = 'dunning' ) OR (object_type = 'dunning1' )
+ OR (object_type = 'dunning2' ) OR (object_type = 'dunning3' ) OR (object_type = 'dunning_orig_invoice' )
+ OR (object_type = 'dunning_invoice' ) OR (object_type = 'draft' ) OR (object_type = 'statement' )
+ OR (object_type = 'shop_image' )
+ OR (object_type = 'letter' )
+ OR (object_type = 'project' )
+ );
[%- IF SELF.may_edit_invoice_permissions %]
<li><a href="#invoice_permissions">[% 'Permissions for invoices' | $T8 %]</a></li>
[%- END %]
+ [%- IF SELF.project.id %]
+ <li><a href="#project_details">[% 'Project Details' | $T8 %]</a></li>
+ [%- IF INSTANCE_CONF.get_doc_storage %]
+ <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=project&object_id=[% SELF.project.id %]">[% 'Attachments' | $T8 %]</a></li>
+ [%- END %]
+ [%- END %]
[%- IF SELF.project.id and AUTH.assert('record_links', 1) %]
<li><a href="#linked_records">[% 'Linked Records' | $T8 %]</a></li>
[%- END %]