Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 75770330

Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt

  • ID 75770330735777217b573465f8431e1d1cc42c31
  • Vorgänger 5b7e8b46
  • Nachfolger 3dc3b1bc

Angebot/Auftrag Status: SimpleSystemSettings zum Anlegen und Verwalten

Unterschiede anzeigen:

SL/Controller/SimpleSystemSetting.pm
175 175
    ],
176 176
  },
177 177

  
178
  order_status => {
179
    # Make locales.pl happy: $self->render("simple_system_setting/_order_status_form")
180
    class  => 'OrderStatus',
181
    titles => {
182
      list => t8('RFQ/Order Statuses'),
183
      add  => t8('Add rfq/order status'),
184
      edit => t8('Edit rfq/order status'),
185
    },
186
    list_attributes => [
187
      { method => 'name',        title => t8('Name') },
188
      { method => 'description', title => t8('Description') },
189
      { method => 'obsolete',    title => t8('Obsolete'), formatter => sub { $_[0]->obsolete ? t8('yes') : t8('no') } },
190
    ],
191
  },
192

  
178 193
  project_status => {
179 194
    class  => 'ProjectStatus',
180 195
    titles => {
SL/DB/Manager/OrderStatus.pm
7 7

  
8 8
use parent qw(SL::DB::Helper::Manager);
9 9

  
10
use SL::DB::Helper::Paginated;
11
use SL::DB::Helper::Sorted;
12

  
10 13
sub object_class { 'SL::DB::OrderStatus' }
11 14

  
12 15
__PACKAGE__->make_manager_methods;
13 16

  
17
sub _sort_spec {
18
  return (
19
    default       => [ 'position', 1 ],
20
    columns       => {
21
      SIMPLE      => 'ALL',
22
      name        => 'lower(order_status.name)',
23
      description => 'lower(order_status.description)',
24
    });
25
}
26

  
14 27
1;
SL/DB/OrderStatus.pm
8 8
use SL::DB::MetaSetup::OrderStatus;
9 9
use SL::DB::Manager::OrderStatus;
10 10

  
11
use SL::DB::Helper::ActsAsList;
12

  
11 13
__PACKAGE__->meta->initialize;
12 14

  
15
sub validate {
16
  my ($self) = @_;
17

  
18
  my @errors;
19
  push @errors, $::locale->text('The name is missing.') if !$self->name;
20

  
21
  my $not_unique_count = SL::DB::Manager::OrderStatus->get_all_count(where => ['!id' => $self->id,
22
                                                                               name  => $self->name]);
23
  push @errors, $::locale->text('The name is not unique.') if $not_unique_count;
24

  
25
  return @errors;
26
}
27

  
13 28
1;
locale/de/all
246 246
  'Add project type'            => 'Projekttypen hinzufügen',
247 247
  'Add requirement spec status' => 'Pflichtenheftstatus hinzufügen',
248 248
  'Add requirement spec type'   => 'Pflichtenhefttypen hinzufügen',
249
  'Add rfq/order status'        => 'Angebots-/Auftrags-Status hinzufügen',
249 250
  'Add risk level'              => 'Risikograd hinzufügen',
250 251
  'Add section'                 => 'Abschnitt hinzufügen',
251 252
  'Add shop'                    => 'Webshop hinzufügen',
......
1331 1332
  'Edit requirement spec status' => 'Pflichtenheftstatus bearbeiten',
1332 1333
  'Edit requirement spec template' => 'Pflichtenheftvorlage bearbeiten',
1333 1334
  'Edit requirement spec type'  => 'Pflichtenhefttypen bearbeiten',
1335
  'Edit rfq/order status'       => 'Angebots-/Auftrags-Status bearbeiten',
1334 1336
  'Edit risk level'             => 'Risikograd bearbeiten',
1335 1337
  'Edit sales letters'          => 'Verkaufsbrief erstellen',
1336 1338
  'Edit sales price rule'       => 'Verkaufspreisregel bearbeiten',
......
2815 2817
  'RFQ'                         => 'Anfrage',
2816 2818
  'RFQ Date'                    => 'Anfragedatum',
2817 2819
  'RFQ Number'                  => 'Anfragenummer',
2820
  'RFQ/Order Statuses'          => 'Angebots-/Auftrags-Status',
2818 2821
  'RFQs'                        => 'Preisanfragen',
2819 2822
  'RMA Delivery Order'          => 'Retouren-Lieferschein',
2820 2823
  'RMA Delivery Orders'         => 'Retouren-Lieferscheine',
locale/en/all
246 246
  'Add project type'            => '',
247 247
  'Add requirement spec status' => '',
248 248
  'Add requirement spec type'   => '',
249
  'Add rfq/order status'        => '',
249 250
  'Add risk level'              => '',
250 251
  'Add section'                 => '',
251 252
  'Add shop'                    => '',
......
1331 1332
  'Edit requirement spec status' => '',
1332 1333
  'Edit requirement spec template' => '',
1333 1334
  'Edit requirement spec type'  => '',
1335
  'Edit rfq/order status'       => '',
1334 1336
  'Edit risk level'             => '',
1335 1337
  'Edit sales letters'          => '',
1336 1338
  'Edit sales price rule'       => '',
......
2815 2817
  'RFQ'                         => '',
2816 2818
  'RFQ Date'                    => '',
2817 2819
  'RFQ Number'                  => '',
2820
  'RFQ/Order Statuses'          => '',
2818 2821
  'RFQs'                        => '',
2819 2822
  'RMA Delivery Order'          => '',
2820 2823
  'RMA Delivery Orders'         => '',
menus/user/00-erp.yaml
1214 1214
  params:
1215 1215
    action: SimpleSystemSetting/list
1216 1216
    type: contact_department
1217
- parent: system
1218
  id: system_order_statuses
1219
  name: RFQ/Order Statuses
1220
  order: 1500
1221
  params:
1222
    action: SimpleSystemSetting/list
1223
    type: order_status
1217 1224
- parent: system
1218 1225
  id: system_project_types
1219 1226
  name: Project Types
templates/webpages/simple_system_setting/_order_status_form.html
1
[%- USE LxERP -%][%- USE L -%]
2
<table>
3
 <tr>
4
  <th align="right">[% LxERP.t8("Name") %]</th>
5
  <td>
6
   [%- L.input_tag("object.name", SELF.object.name, "data-validate"="required", "data-title"=LxERP.t8("Name")) %]
7
  </td>
8
 </tr>
9
 <tr>
10
  <th align="right">[% LxERP.t8("Description") %]</th>
11
  <td>
12
   [%- L.input_tag("object.description", SELF.object.description, "data-title"=LxERP.t8("Description")) %]
13
  </td>
14
 </tr>
15
 <tr>
16
  <th align="right">[% LxERP.t8("Obsolete") %]</th>
17
  <td>[% L.checkbox_tag("object.obsolete", checked=SELF.object.obsolete, for_submit=1) %]</td>
18
 </tr>
19

  
20
</table>

Auch abrufbar als: Unified diff