my %column_defs = (
name => { obj_link => sub { $self->url_for(action => 'edit', 'price_rule.id' => $_[0]->id, callback => $callback) } },
- priority => { sub => sub { $_[0]->priority } },
+ priority => { sub => sub { $_[0]->priority_as_text } },
price => { sub => sub { $_[0]->price_as_number } },
discount => { sub => sub { $_[0]->discount_as_number } },
obsolete => { sub => sub { $_[0]->obsolete_as_bool_yn } },
|| SL::DB::Manager::InvoiceItem->get_all_count(query => [ active_price_source => $price_source_spec ]);
}
+sub priority_as_text {
+ my ($self) = @_;
+
+ return t8('Override') if $self->priority == 4;
+ t8('Normal');
+}
+
1;
'None' => 'Kein',
'None (PriceSource Discount)' => 'Freier Rabatt',
'None (PriceSource)' => 'Freier Preis',
+ 'Normal' => 'Normal',
'Normal users cannot log in.' => 'Normale Benutzer können sich nicht anmelden.',
'Normalize Customer / Vendor names' => 'Normalisierung Kunden- / Lieferantennamen',
'Normalize part description and part notes' => 'Normalisierung Artikelbeschreibung und Artikellangtext (Bemerkung)',
'Output Number Format' => 'Zahlenformat (Ausgabe)',
'Outputformat' => 'Ausgabeformat',
'Overdue sales quotations and requests for quotations' => 'Überfällige Angebote und Preisanfragen',
+ 'Override' => 'Override',
'Override invoice language' => 'Diese Sprache verwenden',
'Owner of account' => 'Kontoinhaber',
'PAYMENT POSTED' => 'Rechnung gebucht',
<td>[% L.input_tag('filter.discount:number', filter.discount_number, size=20) %]</td>
</tr>
<tr>
- <th align="right">[% 'Discount' | $T8 %]</th>
- <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>
+ <th align="right">[% 'Priority' | $T8 %]</th>
+ <td>[% L.select_tag('filter.priority', [ [ '', LxERP.t8('All') ], [ 3, LxERP.t8('Normal') ], [ 4 , LxERP.t8('Override')]], default=filter.priority, style='width: 300px') %]</td>
+ </tr>
+ <tr>
+ <th align="right">[% 'Obsolete' | $T8 %]</th>
+ <td>[% L.select_tag('filter.obsolete', [ [ '', LxERP.t8('Both') ], [ 0, LxERP.t8('Valid') ], [ 1 , LxERP.t8('Obsolete')]], default=filter.obsolete, style='width: 300px') %]</td>
</tr>
</table>
[% L.hidden_tag('page', FORM.page) %]
[% L.input_tag('action_list', LxERP.t8('Continue'), type = 'submit', class='submit')%]
-<a href='#' onClick='javascript:$("#filter_table input").val("");$("#filter_table input[type=checkbox]").prop("checked", 0);'>[% 'Reset' | $T8 %]</a>
+<a href='#' onClick='javascript:$("#filter_table input").val("");$("#filter_table input[type=checkbox]").prop("checked", 0);$("#filter_table select").val("")'>[% 'Reset' | $T8 %]</a>
</div>
[%- END %]
<tr>
<th align="right">[% 'Priority' | $T8 %]</th>
- <td>[% L.select_tag('price_rule.priority', [1,2,3,4,5], default=SELF.price_rule.priority, style='width: 300px') %]</td>
+ <td>[% L.select_tag('price_rule.priority', [ [3, LxERP.t8('Normal') ], [ 4, LxERP.t8('Override') ] ], default=SELF.price_rule.priority, style='width: 300px') %]</td>
</tr>
<tr>