Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 72180323

Von Sven Schöling vor etwa 10 Jahren hinzugefügt

  • ID 72180323f463c9814fbcf21c3376201e6829b21b
  • Vorgänger b2fad3c4
  • Nachfolger 342d55f7

PriceRule: Priorität auf 2 Werte einschränken

Unterschiede anzeigen:

SL/Controller/PriceRule.pm
148 148

  
149 149
  my %column_defs = (
150 150
    name          => { obj_link => sub { $self->url_for(action => 'edit', 'price_rule.id' => $_[0]->id, callback => $callback) } },
151
    priority      => { sub  => sub { $_[0]->priority } },
151
    priority      => { sub  => sub { $_[0]->priority_as_text } },
152 152
    price         => { sub  => sub { $_[0]->price_as_number } },
153 153
    discount      => { sub  => sub { $_[0]->discount_as_number } },
154 154
    obsolete      => { sub  => sub { $_[0]->obsolete_as_bool_yn } },
SL/DB/PriceRule.pm
119 119
  || SL::DB::Manager::InvoiceItem->get_all_count(query => [ active_price_source => $price_source_spec ]);
120 120
}
121 121

  
122
sub priority_as_text {
123
  my ($self) = @_;
124

  
125
  return t8('Override') if $self->priority == 4;
126
  t8('Normal');
127
}
128

  
122 129

  
123 130
1;
locale/de/all
1618 1618
  'None'                        => 'Kein',
1619 1619
  'None (PriceSource Discount)' => 'Freier Rabatt',
1620 1620
  'None (PriceSource)'          => 'Freier Preis',
1621
  'Normal'                      => 'Normal',
1621 1622
  'Normal users cannot log in.' => 'Normale Benutzer können sich nicht anmelden.',
1622 1623
  'Normalize Customer / Vendor names' => 'Normalisierung Kunden- / Lieferantennamen',
1623 1624
  'Normalize part description and part notes' => 'Normalisierung Artikelbeschreibung und Artikellangtext (Bemerkung)',
......
1710 1711
  'Output Number Format'        => 'Zahlenformat (Ausgabe)',
1711 1712
  'Outputformat'                => 'Ausgabeformat',
1712 1713
  'Overdue sales quotations and requests for quotations' => 'Überfällige Angebote und Preisanfragen',
1714
  'Override'                    => 'Override',
1713 1715
  'Override invoice language'   => 'Diese Sprache verwenden',
1714 1716
  'Owner of account'            => 'Kontoinhaber',
1715 1717
  'PAYMENT POSTED'              => 'Rechnung gebucht',
templates/webpages/price_rule/_filter.html
24 24
   <td>[% L.input_tag('filter.discount:number', filter.discount_number, size=20) %]</td>
25 25
  </tr>
26 26
  <tr>
27
   <th align="right">[% 'Discount' | $T8 %]</th>
28
   <td>[% L.select_tag('filter.obsolete', [ [ '', LxERP.t8('Both') ], [ 0, LxERP.t8('Valid') ], [ 1 , LxERP.t8('Obsolete')]], default=filter.obsolete, title_key='description', style='width: 300px') %]</td>
27
   <th align="right">[% 'Priority' | $T8 %]</th>
28
   <td>[% L.select_tag('filter.priority', [ [ '', LxERP.t8('All') ], [ 3, LxERP.t8('Normal') ], [ 4 , LxERP.t8('Override')]], default=filter.priority, style='width: 300px') %]</td>
29
  </tr>
30
  <tr>
31
   <th align="right">[% 'Obsolete' | $T8 %]</th>
32
   <td>[% L.select_tag('filter.obsolete', [ [ '', LxERP.t8('Both') ], [ 0, LxERP.t8('Valid') ], [ 1 , LxERP.t8('Obsolete')]], default=filter.obsolete, style='width: 300px') %]</td>
29 33
  </tr>
30 34
 </table>
31 35

  
......
36 40
[% L.hidden_tag('page', FORM.page) %]
37 41
[% L.input_tag('action_list', LxERP.t8('Continue'), type = 'submit', class='submit')%]
38 42

  
39
<a href='#' onClick='javascript:$("#filter_table input").val("");$("#filter_table input[type=checkbox]").prop("checked", 0);'>[% 'Reset' | $T8 %]</a>
43
<a href='#' onClick='javascript:$("#filter_table input").val("");$("#filter_table input[type=checkbox]").prop("checked", 0);$("#filter_table select").val("")'>[% 'Reset' | $T8 %]</a>
40 44

  
41 45
</div>
42 46

  
templates/webpages/price_rule/form.html
23 23
[%- END %]
24 24
   <tr>
25 25
    <th align="right">[% 'Priority' | $T8 %]</th>
26
    <td>[% L.select_tag('price_rule.priority', [1,2,3,4,5], default=SELF.price_rule.priority, style='width: 300px') %]</td>
26
    <td>[% L.select_tag('price_rule.priority', [ [3, LxERP.t8('Normal') ], [ 4, LxERP.t8('Override') ] ], default=SELF.price_rule.priority, style='width: 300px') %]</td>
27 27
   </tr>
28 28

  
29 29
   <tr>

Auch abrufbar als: Unified diff