Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 18d543d0

Von Bernd Bleßmann vor mehr als 1 Jahr hinzugefügt

Verknüpfte Belege: Verknüpfungen hinzufügen: Kein Kunde/Lieferant/Projekt/Beschreibung …

… als Filter anbieten, wenn nicht verfügbar im zu verknüpfenden Beleg.
Betrifft Mahnungen und Shop-Aufträge.

Refs #544 (redmine)

Unterschiede anzeigen:

SL/Controller/RecordLinks.pm
40 40

  
41 41
my @link_type_specifics = (
42 42
  { title => t8('Requirement spec'),        type => 'requirement_spec',        model => 'RequirementSpec', number => 'id', project => 'project', description => 'title', date => undef, filter => 'working_copy_filter', },
43
  { title => t8('Shop Order'),              type => 'shop_order',              model => 'ShopOrder',       number => 'shop_ordernumber', date => 'order_date', project => undef, },
43
  { title => t8('Shop Order'),              type => 'shop_order',              model => 'ShopOrder',       number => 'shop_ordernumber', date => 'order_date', project => undef, description => undef, },
44 44
  { title => t8('Sales quotation'),         type => 'sales_quotation',         model => 'Order',           number => 'quonumber', },
45 45
  { title => t8('Sales Order'),             type => 'sales_order',             model => 'Order',           number => 'ordnumber', },
46 46
  { title => t8('Sales delivery order'),    type => 'sales_delivery_order',    model => 'DeliveryOrder',   number => 'donumber',  },
......
57 57
  { title => t8('Email'),                   type => 'email_journal',           model => 'EmailJournal',    number => 'id', description => 'subject', description_title => t8('Subject'), project => undef, date => 'sent_on',},
58 58
  { title => t8('AR Transaction'),          type => 'ar_transaction',          model => 'Invoice',         number => 'invnumber', },
59 59
  { title => t8('AP Transaction'),          type => 'ap_transaction',          model => 'PurchaseInvoice', number => 'invnumber', },
60
  { title => t8('Dunning'),                 type => 'dunning',                 model => 'Dunning',         number => 'dunning_id', },
60
  { title => t8('Dunning'),                 type => 'dunning',                 model => 'Dunning',         number => 'dunning_id', project => undef, description => undef,},
61 61
  { title => t8('GL Transaction'),          type => 'gl_transaction',          model => 'GLTransaction',   number => 'reference', project => undef},
62 62
);
63 63

  
templates/design40_webpages/record_links/add_filter.html
35 35
      <th>[% LxERP.t8("Project") %]</tdh>
36 36
      <td>[% L.select_tag('globalproject_id', PROJECTS, default=SELF.object.globalproject_id, with_empty=1, class='wi-wide') %]</td>
37 37
    </tr>
38
    <tr>
38
    <tr id="record_links_add_filter_title_row">
39 39
      <th><span id="record_links_add_filter_title">[% LxERP.t8("Transaction description") %]</span></th>
40 40
      <td>[% L.input_tag('transaction_description', '', class='wi-wide') %]</td>
41 41
    </tr>
......
95 95
            : type == 'email_journal'    ? kivi.t8('Subject')
96 96
            :                              kivi.t8('Transaction description');
97 97

  
98
  if (type == 'letter' || type == 'email_journal' || type == 'gl_transaction') {
98
  if (type == 'letter' || type == 'email_journal' || type == 'gl_transaction' ||
99
      type == 'dunning' || type == 'shop_order') {
99 100
    $('#record_links_add_filter_project_row').hide();
100 101

  
101 102
  } else {
102 103
    $('#record_links_add_filter_project_row').show();
103 104
  }
104 105

  
105
  if (type == 'email_journal' || type == 'gl_transaction') {
106
  if (type == 'email_journal' || type == 'gl_transaction' || type == 'dunning') {
106 107
    $('.record_links_add_filter_cv_row').hide();
107 108

  
108 109
  } else {
109 110
    $('.record_links_add_filter_cv_row').show();
110 111
  }
111 112

  
112
  $('#record_links_add_filter_title').html(title);
113
  if (type == 'dunning' || type == 'shop_order') {
114
    $('#record_links_add_filter_title_row').hide();
115

  
116
  } else {
117
    $('#record_links_add_filter_title').html(title);
118
    $('#record_links_add_filter_title_row').show();
119
  }
113 120
}
114 121
--></script>
templates/design40_webpages/record_links/add_list.html
21 21
        [% IF date_column %]
22 22
          <th>[% LxERP.t8("Date") %]</th>
23 23
        [% END %]
24
        <th>[% HTML.escape(description_title) %]</th>
24
        [% IF description_column %]
25
          <th>[% HTML.escape(description_title) %]</th>
26
        [% END %]
25 27
        [% IF project_column %]
26 28
          <th>[% LxERP.t8("Project") %]</th>
27 29
        [% END %]
......
38 40
          [% IF date_column %]
39 41
            <td>[% HTML.escape(object.$date_column.to_kivitendo) %]</td>
40 42
          [% END %]
41
          <td>[% HTML.escape(object.$description_column) %]</td>
43
          [% IF description_column %]
44
            <td>[% HTML.escape(object.$description_column) %]</td>
45
          [% END %]
42 46
          [% IF project_column %]
43 47
            <td>[% object.$project_column.presenter.project(no_link=1) %]</td>
44 48
          [% END %]
templates/webpages/record_links/add_filter.html
41 41
   <td>[% L.select_tag('globalproject_id', PROJECTS, default=SELF.object.globalproject_id, with_empty=1, style=style) %]</td>
42 42
  </tr>
43 43

  
44
  <tr>
44
  <tr id="record_links_add_filter_title_row">
45 45
   <td><span id="record_links_add_filter_title">[%- LxERP.t8("Transaction description") %]</span>:</td>
46 46
   <td>[% L.input_tag('transaction_description', '', style=style) %]</td>
47 47
  </tr>
......
102 102
            : type == 'email_journal'    ? kivi.t8('Subject')
103 103
            :                              kivi.t8('Transaction description');
104 104

  
105
  if (type == 'letter' || type == 'email_journal' || type == 'gl_transaction') {
105
  if (type == 'letter' || type == 'email_journal' || type == 'gl_transaction' ||
106
      type == 'dunning' || type == 'shop_order') {
106 107
    $('#record_links_add_filter_project_row').hide();
107 108

  
108 109
  } else {
109 110
    $('#record_links_add_filter_project_row').show();
110 111
  }
111 112

  
112
  if (type == 'email_journal' || type == 'gl_transaction') {
113
  if (type == 'email_journal' || type == 'gl_transaction' || type == 'dunning') {
113 114
    $('.record_links_add_filter_cv_row').hide();
114 115

  
115 116
  } else {
116 117
    $('.record_links_add_filter_cv_row').show();
117 118
  }
118 119

  
119
  $('#record_links_add_filter_title').html(title);
120
  if (type == 'dunning' || type == 'shop_order') {
121
    $('#record_links_add_filter_title_row').hide();
122

  
123
  } else {
124
    $('#record_links_add_filter_title').html(title);
125
    $('#record_links_add_filter_title_row').show();
126
  }
120 127
}
121 128
-->
122 129
</script>
templates/webpages/record_links/add_list.html
12 12
  [% IF date_column %]
13 13
   <th>[%- LxERP.t8("Date") %]</th>
14 14
  [% END %]
15
  <th>[% HTML.escape(description_title) %]</th>
15
  [% IF description_column %]
16
   <th>[% HTML.escape(description_title) %]</th>
17
  [% END %]
16 18
  [% IF project_column %]
17 19
   <th>[%- LxERP.t8("Project") %]</th>
18 20
  [% END %]
......
28 30
  [% IF date_column %]
29 31
   <td>[%- HTML.escape(object.$date_column.to_kivitendo) %]</td>
30 32
  [% END %]
31
  <td>[%- HTML.escape(object.$description_column) %]</td>
33
  [% IF description_column %]
34
   <td>[%- HTML.escape(object.$description_column) %]</td>
35
  [% END %]
32 36
  [% IF project_column %]
33 37
   <td>[%- object.$project_column.presenter.project(no_link=1) %]</td>
34 38
  [% END %]

Auch abrufbar als: Unified diff