Revision 1ce68041
Von Martin Helmling martin.helmling@octosoft.eu vor fast 8 Jahren hinzugefügt
SL/Controller/CustomerVendor.pm | ||
---|---|---|
940 | 940 |
|
941 | 941 |
$::request->{layout}->add_javascripts('autocomplete_customer.js'); |
942 | 942 |
$::request->{layout}->add_javascripts('kivi.CustomerVendor.js'); |
943 |
$::request->{layout}->add_javascripts('kivi.File.js'); |
|
943 | 944 |
} |
944 | 945 |
|
945 | 946 |
sub _prepare_cvar_configs_for_ajaj { |
SL/Controller/Order.pm | ||
---|---|---|
9 | 9 |
use SL::SessionFile::Random; |
10 | 10 |
use SL::PriceSource; |
11 | 11 |
use SL::Webdav; |
12 |
use SL::File; |
|
12 | 13 |
|
13 | 14 |
use SL::DB::Order; |
14 | 15 |
use SL::DB::Default; |
... | ... | |
209 | 210 |
$self->js->flash('error', t8('Storing PDF to webdav folder failed: #1', $@)); |
210 | 211 |
} |
211 | 212 |
} |
212 |
|
|
213 |
if ($self->order->ordnumber && $::instance_conf->get_doc_storage) { |
|
214 |
SL::File->store( object_id => $self->order->id, |
|
215 |
object_type => $self->type, |
|
216 |
mime_type => 'application/pdf', |
|
217 |
source => 'created', |
|
218 |
file_type => 'document', |
|
219 |
file_name => $pdf_filename, |
|
220 |
file_contents => $pdf); |
|
221 |
} |
|
213 | 222 |
$self->js->render; |
214 | 223 |
} |
215 | 224 |
|
... | ... | |
1087 | 1096 |
} } @all_objects; |
1088 | 1097 |
} |
1089 | 1098 |
|
1090 |
$::request->{layout}->use_javascript("${_}.js") for qw(kivi.SalesPurchase kivi.Order ckeditor/ckeditor ckeditor/adapters/jquery); |
|
1099 |
$::request->{layout}->use_javascript("${_}.js") for qw(kivi.SalesPurchase kivi.Order kivi.File ckeditor/ckeditor ckeditor/adapters/jquery);
|
|
1091 | 1100 |
} |
1092 | 1101 |
|
1093 | 1102 |
sub _create_pdf { |
SL/Controller/Part.pm | ||
---|---|---|
617 | 617 |
|
618 | 618 |
sub _set_javascript { |
619 | 619 |
my ($self) = @_; |
620 |
$::request->layout->use_javascript("${_}.js") for qw(kivi.Part kivi.PriceRule ckeditor/ckeditor ckeditor/adapters/jquery); |
|
620 |
$::request->layout->use_javascript("${_}.js") for qw(kivi.Part kivi.File kivi.PriceRule ckeditor/ckeditor ckeditor/adapters/jquery);
|
|
621 | 621 |
$::request->layout->add_javascripts_inline("\$(function(){kivi.PriceRule.load_price_rules_for_part(@{[ $self->part->id ]})});") if $self->part->id; |
622 | 622 |
} |
623 | 623 |
|
bin/mozilla/ap.pl | ||
---|---|---|
433 | 433 |
my $follow_up_vc = $form->{vendor_id} ? SL::DB::Vendor->load_cached($form->{vendor_id})->name : ''; |
434 | 434 |
my $follow_up_trans_info = "$form->{invnumber} ($follow_up_vc)"; |
435 | 435 |
|
436 |
$::request->layout->add_javascripts("autocomplete_chart.js", "autocomplete_customer.js", "show_vc_details.js", "show_history.js", "follow_up.js", "kivi.Draft.js", "kivi.GL.js", "kivi.RecordTemplate.js"); |
|
436 |
$::request->layout->add_javascripts("autocomplete_chart.js", "autocomplete_customer.js", "show_vc_details.js", "show_history.js", "follow_up.js", "kivi.Draft.js", "kivi.GL.js", "kivi.RecordTemplate.js", "kivi.File.js");
|
|
437 | 437 |
my $transdate = $::form->{transdate} ? DateTime->from_kivitendo($::form->{transdate}) : DateTime->today_local; |
438 | 438 |
my $first_taxchart; |
439 | 439 |
|
bin/mozilla/ar.pl | ||
---|---|---|
389 | 389 |
my $follow_up_vc = $form->{customer_id} ? SL::DB::Customer->load_cached($form->{customer_id})->name : ''; |
390 | 390 |
my $follow_up_trans_info = "$form->{invnumber} ($follow_up_vc)"; |
391 | 391 |
|
392 |
$::request->layout->add_javascripts("autocomplete_chart.js", "autocomplete_customer.js", "show_vc_details.js", "show_history.js", "follow_up.js", "kivi.Draft.js", "kivi.GL.js", "kivi.RecordTemplate.js"); |
|
392 |
$::request->layout->add_javascripts("autocomplete_chart.js", "autocomplete_customer.js", "show_vc_details.js", "show_history.js", "follow_up.js", "kivi.Draft.js", "kivi.GL.js", "kivi.File.js", "kivi.RecordTemplate.js");
|
|
393 | 393 |
|
394 | 394 |
my $transdate = $::form->{transdate} ? DateTime->from_kivitendo($::form->{transdate}) : DateTime->today_local; |
395 | 395 |
my $first_taxchart; |
bin/mozilla/do.pl | ||
---|---|---|
302 | 302 |
|
303 | 303 |
$form->{follow_up_trans_info} = $form->{donumber} .'('. $form->{VC_OBJ}->name .')'; |
304 | 304 |
|
305 |
$::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery kivi.io autocomplete_customer autocomplete_part)); |
|
305 |
$::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.File kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery kivi.io autocomplete_customer autocomplete_part));
|
|
306 | 306 |
|
307 | 307 |
my @custom_hidden; |
308 | 308 |
push @custom_hidden, map { "shiptocvar_" . $_->name } @{ SL::DB::Manager::CustomVariableConfig->get_all(where => [ module => 'ShipTo' ]) }; |
bin/mozilla/ir.pl | ||
---|---|---|
296 | 296 |
$TMPL_VAR{payment_terms_obj} = get_payment_terms_for_invoice(); |
297 | 297 |
$form->{duedate} = $TMPL_VAR{payment_terms_obj}->calc_date(reference_date => $form->{invdate}, due_date => $form->{due_due})->to_kivitendo if $TMPL_VAR{payment_terms_obj}; |
298 | 298 |
|
299 |
$::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.Draft kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery kivi.io autocomplete_customer autocomplete_part autocomplete_project client_js)); |
|
299 |
$::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.Draft kivi.File kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery kivi.io autocomplete_customer autocomplete_part autocomplete_project client_js));
|
|
300 | 300 |
|
301 | 301 |
$form->header(); |
302 | 302 |
|
bin/mozilla/is.pl | ||
---|---|---|
354 | 354 |
), @custom_hiddens, |
355 | 355 |
map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}]; |
356 | 356 |
|
357 |
$::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.Draft kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery kivi.io autocomplete_customer autocomplete_part client_js)); |
|
357 |
$::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.Draft kivi.File kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery kivi.io autocomplete_customer autocomplete_part client_js));
|
|
358 | 358 |
|
359 | 359 |
$TMPL_VAR{payment_terms_obj} = get_payment_terms_for_invoice(); |
360 | 360 |
$form->{duedate} = $TMPL_VAR{payment_terms_obj}->calc_date(reference_date => $form->{invdate}, due_date => $form->{duedate})->to_kivitendo if $TMPL_VAR{payment_terms_obj}; |
bin/mozilla/oe.pl | ||
---|---|---|
435 | 435 |
} |
436 | 436 |
} |
437 | 437 |
|
438 |
$::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase show_form_details show_history show_vc_details ckeditor/ckeditor ckeditor/adapters/jquery kivi.io autocomplete_customer autocomplete_part)); |
|
438 |
$::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase kivi.File show_form_details show_history show_vc_details ckeditor/ckeditor ckeditor/adapters/jquery kivi.io autocomplete_customer autocomplete_part));
|
|
439 | 439 |
|
440 | 440 |
$form->header; |
441 | 441 |
if ($form->{CFDD_shipto} && $form->{CFDD_shipto_id} ) { |
templates/webpages/ap/form_header.html | ||
---|---|---|
59 | 59 |
[%- IF INSTANCE_CONF.get_webdav %] |
60 | 60 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
61 | 61 |
[%- END %] |
62 |
[%- IF id AND INSTANCE_CONF.get_doc_storage %] |
|
63 |
<li><a href="controller.pl?action=File/list&file_type=document&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li> |
|
64 |
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li> |
|
65 |
[%- END %] |
|
62 | 66 |
[%- IF id %] |
63 | 67 |
[%- IF AUTH.assert('record_links', 1) %] |
64 | 68 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
templates/webpages/ar/form_header.html | ||
---|---|---|
26 | 26 |
<ul> |
27 | 27 |
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li> |
28 | 28 |
[%- IF id %] |
29 |
[%- IF INSTANCE_CONF.get_doc_storage %] |
|
30 |
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=invoice&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li> |
|
31 |
[%- END %] |
|
29 | 32 |
[% IF AUTH.assert('record_links', 1) %] |
30 | 33 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Invoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
31 | 34 |
[%- END %] |
templates/webpages/customer_vendor/form.html | ||
---|---|---|
24 | 24 |
<li><a href="#contacts">[% 'Contacts' | $T8 %]</a></li> |
25 | 25 |
[% IF ( SELF.cv.id && AUTH.assert('sales_all_edit', 1) ) %] |
26 | 26 |
<li><a href="#deliveries">[% 'Supplies' | $T8 %]</a></li> |
27 |
[%- IF INSTANCE_CONF.get_doc_storage %] |
|
28 |
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=[% FORM.db == 'vendor' ? 'vendor' : 'customer' %]&object_id=[% SELF.cv.id %]">[% 'Attachments' | $T8 %]</a></li> |
|
29 |
[%- END %] |
|
27 | 30 |
[% END %] |
28 | 31 |
<li><a href="#vcnotes">[% 'Notes' | $T8 %]</a></li> |
29 | 32 |
|
templates/webpages/do/form_header.html | ||
---|---|---|
45 | 45 |
[%- IF INSTANCE_CONF.get_webdav %] |
46 | 46 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
47 | 47 |
[%- END %] |
48 |
[%- IF id AND INSTANCE_CONF.get_doc_storage %] |
|
49 |
<li><a href="controller.pl?action=File/list&file_type=document&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li> |
|
50 |
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li> |
|
51 |
[%- END %] |
|
48 | 52 |
[%- IF id AND AUTH.assert('record_links', 1) %] |
49 | 53 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=DeliveryOrder&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
50 | 54 |
[%- END %] |
templates/webpages/gl/form_header.html | ||
---|---|---|
36 | 36 |
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li> |
37 | 37 |
[%- IF INSTANCE_CONF.get_webdav %] |
38 | 38 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
39 |
[%- END %] |
|
40 |
[%- IF id %] |
|
41 |
[%- IF INSTANCE_CONF.get_doc_storage %] |
|
42 |
<li><a href="controller.pl?action=File/list&file_type=document&object_type=gl_transaction&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li> |
|
43 |
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=gl_transaction&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li> |
|
44 |
[%- END %] |
|
39 | 45 |
[%- END %] |
40 | 46 |
</ul> |
41 | 47 |
<div id="ui-tabs-basic-data"> |
templates/webpages/ir/form_header.html | ||
---|---|---|
32 | 32 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
33 | 33 |
[%- END %] |
34 | 34 |
[%- IF id %] |
35 |
[%- IF INSTANCE_CONF.get_doc_storage %] |
|
36 |
<li><a href="controller.pl?action=File/list&file_type=document&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li> |
|
37 |
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=purchase_invoice&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li> |
|
38 |
[%- END %] |
|
35 | 39 |
[%- IF AUTH.assert('record_links', 1) %] |
36 | 40 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=PurchaseInvoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
37 | 41 |
[%- END %] |
templates/webpages/is/form_header.html | ||
---|---|---|
33 | 33 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
34 | 34 |
[%- END %] |
35 | 35 |
[%- IF id %] |
36 |
[%- IF INSTANCE_CONF.get_doc_storage %] |
|
37 |
<li><a href="controller.pl?action=File/list&file_type=document&object_type=invoice&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li> |
|
38 |
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=invoice&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li> |
|
39 |
[%- END %] |
|
36 | 40 |
[%- IF AUTH.assert('record_links', 1) %] |
37 | 41 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Invoice&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
38 | 42 |
[%- END %] |
templates/webpages/oe/form_header.html | ||
---|---|---|
35 | 35 |
[%- IF INSTANCE_CONF.get_webdav %] |
36 | 36 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
37 | 37 |
[%- END %] |
38 |
[%- IF id AND INSTANCE_CONF.get_doc_storage %] |
|
39 |
<li><a href="controller.pl?action=File/list&file_type=document&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li> |
|
40 |
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li> |
|
41 |
[%- END %] |
|
38 | 42 |
[%- IF id AND AUTH.assert('record_links', 1) %] |
39 | 43 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Order&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li> |
40 | 44 |
[%- END %] |
templates/webpages/order/form.html | ||
---|---|---|
26 | 26 |
[%- IF INSTANCE_CONF.get_webdav %] |
27 | 27 |
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li> |
28 | 28 |
[%- END %] |
29 |
[%- IF SELF.order.id AND INSTANCE_CONF.get_doc_storage %] |
|
30 |
<li><a href="controller.pl?action=File/list&file_type=document&object_type=[% HTML.escape(FORM.type) %]&object_id=[% HTML.url(SELF.order.id) %]">[% 'Documents' | $T8 %]</a></li> |
|
31 |
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=[% HTML.escape(FORM.type) %]&object_id=[% HTML.url(SELF.order.id) %]">[% 'Attachments' | $T8 %]</a></li> |
|
32 |
[%- END %] |
|
29 | 33 |
[%- IF SELF.order.id %] |
30 | 34 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Order&object_id=[% HTML.url(SELF.order.id) %]">[% 'Linked Records' | $T8 %]</a></li> |
31 | 35 |
[%- END %] |
templates/webpages/part/form.html | ||
---|---|---|
22 | 22 |
[%- IF SELF.part.is_assembly %] |
23 | 23 |
<li><a href="#assembly_tab">[% 'Assembly items' | $T8 %]</a></li> |
24 | 24 |
[%- END %] |
25 |
[%- IF INSTANCE_CONF.get_doc_storage %] |
|
26 |
<li><a href="controller.pl?action=File/list&file_type=attachment&object_type=part&object_id=[% SELF.part.id %]">[% 'Attachments' | $T8 %]</a></li> |
|
27 |
<li><a href="controller.pl?action=File/list&file_type=image&object_type=part&object_id=[% SELF.part.id %]">[% 'Images' | $T8 %]</a></li> |
|
28 |
[%- END %] |
|
25 | 29 |
[% IF SELF.all_languages.size %] |
26 | 30 |
<li><a href="#translations_tab">[% 'Translations' | $T8 %]</a></li> |
27 | 31 |
[% END %] |
Auch abrufbar als: Unified diff
Dateimanagement: Integration in Masken und Controller
Einbau in alte Masken (bin/mozilla/* und templates/webpages/??/)
sowie in neue Controller für Kunden/Lieferanten/Artikel ,
in neuen Auftragscontroller