Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3d433e1f

Von Tamino Steinert vor 11 Monaten hinzugefügt

  • ID 3d433e1f69add82bd4c654e7ca6b1071a35e0c86
  • Vorgänger 9da868aa

Varianten: SQL-Scripte und ROSE-DB Dateien erstellt

Unterschiede anzeigen:

SL/DB/Helper/ALL.pm
91 91
use SL::DB::Part;
92 92
use SL::DB::PartClassification;
93 93
use SL::DB::PartCustomerPrice;
94
use SL::DB::PartParentVarientPartVarient;
94 95
use SL::DB::PartsGroup;
95 96
use SL::DB::PartsPriceHistory;
96 97
use SL::DB::PaymentTerm;
......
153 154
use SL::DB::TodoUserConfig;
154 155
use SL::DB::TransferType;
155 156
use SL::DB::Translation;
157
use SL::DB::TranslationVarientProperty;
158
use SL::DB::TranslationVarientPropertyValue;
156 159
use SL::DB::TriggerInformation;
157 160
use SL::DB::Unit;
158 161
use SL::DB::UnitsLanguage;
159 162
use SL::DB::UserPreference;
160 163
use SL::DB::VC;
161 164
use SL::DB::ValidityToken;
165
use SL::DB::VarientProperty;
166
use SL::DB::VarientPropertyPart;
167
use SL::DB::VarientPropertyValue;
168
use SL::DB::VarientPropertyValuePart;
162 169
use SL::DB::Vendor;
163 170
use SL::DB::Warehouse;
164 171

  
SL/DB/Helper/Mappings.pm
168 168
  oe                             => 'order',
169 169
  oe_version                     => 'order_version',
170 170
  parts                          => 'part',
171
  parts_parent_variant_id_parts_variant_id => 'PartParentVarientPartVarient',
171 172
  partsgroup                     => 'parts_group',
172 173
  part_classifications           => 'PartClassification',
173 174
  part_customer_prices           => 'PartCustomerPrice',
......
231 232
  todo_user_config               => 'todo_user_config',
232 233
  transfer_type                  => 'transfer_type',
233 234
  translation                    => 'translation',
235
  translation_varient_properties => 'TranslationVarientProperty',
236
  translation_varient_property_values => 'TranslationVarientPropertyValue',
234 237
  trigger_information            => 'trigger_information',
235 238
  units                          => 'unit',
236 239
  units_language                 => 'units_language',
237 240
  user_preferences               => 'user_preference',
238 241
  validity_tokens                => 'ValidityToken',
242
  variant_properties             => 'VarientProperty',
243
  varient_properties_parts       => 'VarientPropertyPart',
244
  variant_property_values        => 'VarientPropertyValue',
245
  varient_property_values_parts  => 'VarientPropertyValuePart',
239 246
  vendor                         => 'vendor',
240 247
  warehouse                      => 'warehouse',
241 248
);
SL/DB/Helper/TransNumberGenerator.pm
47 47
              service                     => { number_column => 'partnumber',     number_range_column => 'servicenumber',                              },
48 48
              assembly                    => { number_column => 'partnumber',     number_range_column => 'assemblynumber',                             },
49 49
              assortment                  => { number_column => 'partnumber',     number_range_column => 'assortmentnumber',                           },
50
              parent_variant              => { number_column => 'partnumber',     number_range_column => 'parent_variant_number',                      },
51
              variant                     => { number_column => 'partnumber',     number_range_column => 'variant_number',                             },
50 52
            );
51 53

  
52 54
sub get_next_trans_number {
SL/DB/Manager/PartParentVarientPartVarient.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Manager::PartParentVarientPartVarient;
5

  
6
use strict;
7

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

  
10
sub object_class { 'SL::DB::PartParentVarientPartVarient' }
11

  
12
__PACKAGE__->make_manager_methods;
13

  
14
1;
SL/DB/Manager/TranslationVarientProperty.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Manager::TranslationVarientProperty;
5

  
6
use strict;
7

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

  
10
sub object_class { 'SL::DB::TranslationVarientProperty' }
11

  
12
__PACKAGE__->make_manager_methods;
13

  
14
1;
SL/DB/Manager/TranslationVarientPropertyValue.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Manager::TranslationVarientPropertyValue;
5

  
6
use strict;
7

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

  
10
sub object_class { 'SL::DB::TranslationVarientPropertyValue' }
11

  
12
__PACKAGE__->make_manager_methods;
13

  
14
1;
SL/DB/Manager/VarientProperty.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Manager::VarientProperty;
5

  
6
use strict;
7

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

  
10
sub object_class { 'SL::DB::VarientProperty' }
11

  
12
__PACKAGE__->make_manager_methods;
13

  
14
1;
SL/DB/Manager/VarientPropertyPart.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Manager::VarientPropertyPart;
5

  
6
use strict;
7

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

  
10
sub object_class { 'SL::DB::VarientPropertyPart' }
11

  
12
__PACKAGE__->make_manager_methods;
13

  
14
1;
SL/DB/Manager/VarientPropertyValue.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Manager::VarientPropertyValue;
5

  
6
use strict;
7

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

  
10
sub object_class { 'SL::DB::VarientPropertyValue' }
11

  
12
__PACKAGE__->make_manager_methods;
13

  
14
1;
SL/DB/Manager/VarientPropertyValuePart.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Manager::VarientPropertyValuePart;
5

  
6
use strict;
7

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

  
10
sub object_class { 'SL::DB::VarientPropertyValuePart' }
11

  
12
__PACKAGE__->make_manager_methods;
13

  
14
1;
SL/DB/MetaSetup/Default.pm
145 145
  order_warn_no_cusordnumber                => { type => 'boolean', default => 'false' },
146 146
  order_warn_no_deliverydate                => { type => 'boolean', default => 'true' },
147 147
  p_reclamation_record_number               => { type => 'text', default => '0', not_null => 1 },
148
  parent_variant_number                     => { type => 'text' },
148 149
  parts_image_css                           => { type => 'text', default => 'border:0;float:left;max-width:250px;margin-top:20px:margin-right:10px;margin-left:10px;' },
149 150
  parts_listing_image                       => { type => 'boolean', default => 'true' },
150 151
  parts_show_image                          => { type => 'boolean', default => 'true' },
......
221 222
  transit_items_chart_id                    => { type => 'integer' },
222 223
  transport_cost_reminder_article_number_id => { type => 'integer' },
223 224
  undo_transfer_interval                    => { type => 'integer', default => 7 },
225
  variant_number                            => { type => 'text' },
224 226
  vc_greetings_use_textfield                => { type => 'boolean' },
225 227
  vendor_ustid_taxnummer_unique             => { type => 'boolean', default => 'false' },
226 228
  vendornumber                              => { type => 'text' },
SL/DB/MetaSetup/Part.pm
32 32
  obsolete           => { type => 'boolean', default => 'false', not_null => 1 },
33 33
  onhand             => { type => 'numeric', default => '0', precision => 25, scale => 5 },
34 34
  order_qty          => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
35
  part_type          => { type => 'enum', check_in => [ 'part', 'service', 'assembly', 'assortment' ], db_type => 'part_type_enum', not_null => 1 },
35
  part_type          => { type => 'enum', check_in => [ 'part', 'service', 'assembly', 'assortment', 'parent_variant', 'variant' ], db_type => 'part_type_enum', not_null => 1 },
36 36
  partnumber         => { type => 'text', not_null => 1 },
37 37
  partsgroup_id      => { type => 'integer' },
38 38
  payment_id         => { type => 'integer' },
SL/DB/MetaSetup/PartParentVarientPartVarient.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::PartParentVarientPartVarient;
4

  
5
use strict;
6

  
7
use parent qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->table('parts_parent_variant_id_parts_variant_id');
10

  
11
__PACKAGE__->meta->columns(
12
  parent_variant_id => { type => 'integer', not_null => 1 },
13
  variant_id        => { type => 'integer', not_null => 1 },
14
);
15

  
16
__PACKAGE__->meta->primary_key_columns([ 'parent_variant_id', 'variant_id' ]);
17

  
18
__PACKAGE__->meta->unique_keys([ 'variant_id' ]);
19

  
20
__PACKAGE__->meta->foreign_keys(
21
  parent_variant => {
22
    class       => 'SL::DB::Part',
23
    key_columns => { parent_variant_id => 'id' },
24
  },
25

  
26
  variant => {
27
    class       => 'SL::DB::Part',
28
    key_columns => { variant_id => 'id' },
29
    rel_type    => 'one to one',
30
  },
31
);
32

  
33
1;
34
;
SL/DB/MetaSetup/TranslationVarientProperty.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::TranslationVarientProperty;
4

  
5
use strict;
6

  
7
use parent qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->table('translation_varient_properties');
10

  
11
__PACKAGE__->meta->columns(
12
  itime               => { type => 'timestamp', default => 'now()' },
13
  language_id         => { type => 'integer', not_null => 1 },
14
  mtime               => { type => 'timestamp' },
15
  name                => { type => 'text', not_null => 1 },
16
  varient_property_id => { type => 'integer', not_null => 1 },
17
);
18

  
19
__PACKAGE__->meta->primary_key_columns([ 'varient_property_id', 'language_id' ]);
20

  
21
__PACKAGE__->meta->allow_inline_column_values(1);
22

  
23
__PACKAGE__->meta->foreign_keys(
24
  language => {
25
    class       => 'SL::DB::Language',
26
    key_columns => { language_id => 'id' },
27
  },
28

  
29
  varient_property => {
30
    class       => 'SL::DB::VarientProperty',
31
    key_columns => { varient_property_id => 'id' },
32
  },
33
);
34

  
35
1;
36
;
SL/DB/MetaSetup/TranslationVarientPropertyValue.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::TranslationVarientPropertyValue;
4

  
5
use strict;
6

  
7
use parent qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->table('translation_varient_property_values');
10

  
11
__PACKAGE__->meta->columns(
12
  itime                     => { type => 'timestamp', default => 'now()' },
13
  language_id               => { type => 'integer', not_null => 1 },
14
  mtime                     => { type => 'timestamp' },
15
  value                     => { type => 'text', not_null => 1 },
16
  varient_property_value_id => { type => 'integer', not_null => 1 },
17
);
18

  
19
__PACKAGE__->meta->primary_key_columns([ 'varient_property_value_id', 'language_id' ]);
20

  
21
__PACKAGE__->meta->allow_inline_column_values(1);
22

  
23
__PACKAGE__->meta->foreign_keys(
24
  language => {
25
    class       => 'SL::DB::Language',
26
    key_columns => { language_id => 'id' },
27
  },
28

  
29
  varient_property_value => {
30
    class       => 'SL::DB::VarientPropertyValue',
31
    key_columns => { varient_property_value_id => 'id' },
32
  },
33
);
34

  
35
1;
36
;
SL/DB/MetaSetup/VarientProperty.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::VarientProperty;
4

  
5
use strict;
6

  
7
use parent qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->table('variant_properties');
10

  
11
__PACKAGE__->meta->columns(
12
  abbreviation => { type => 'varchar', length => 4, not_null => 1 },
13
  id           => { type => 'serial', not_null => 1 },
14
  itime        => { type => 'timestamp', default => 'now()' },
15
  mtime        => { type => 'timestamp' },
16
  name         => { type => 'text', not_null => 1 },
17
  unique_name  => { type => 'text', not_null => 1 },
18
);
19

  
20
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
21

  
22
__PACKAGE__->meta->unique_keys([ 'unique_name' ]);
23

  
24
__PACKAGE__->meta->allow_inline_column_values(1);
25

  
26
1;
27
;
SL/DB/MetaSetup/VarientPropertyPart.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::VarientPropertyPart;
4

  
5
use strict;
6

  
7
use parent qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->table('varient_properties_parts');
10

  
11
__PACKAGE__->meta->columns(
12
  part_id             => { type => 'integer', not_null => 1 },
13
  variant_property_id => { type => 'integer', not_null => 1 },
14
);
15

  
16
__PACKAGE__->meta->primary_key_columns([ 'part_id', 'variant_property_id' ]);
17

  
18
__PACKAGE__->meta->unique_keys([ 'variant_property_id', 'part_id' ]);
19

  
20
__PACKAGE__->meta->foreign_keys(
21
  part => {
22
    class       => 'SL::DB::Part',
23
    key_columns => { part_id => 'id' },
24
  },
25

  
26
  variant_property => {
27
    class       => 'SL::DB::VarientProperty',
28
    key_columns => { variant_property_id => 'id' },
29
  },
30
);
31

  
32
1;
33
;
SL/DB/MetaSetup/VarientPropertyValue.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::VarientPropertyValue;
4

  
5
use strict;
6

  
7
use parent qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->table('variant_property_values');
10

  
11
__PACKAGE__->meta->columns(
12
  id                  => { type => 'serial', not_null => 1 },
13
  itime               => { type => 'timestamp', default => 'now()' },
14
  mtime               => { type => 'timestamp' },
15
  sortkey             => { type => 'integer', not_null => 1 },
16
  value               => { type => 'text', not_null => 1 },
17
  variant_property_id => { type => 'integer', not_null => 1 },
18
);
19

  
20
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
21

  
22
__PACKAGE__->meta->allow_inline_column_values(1);
23

  
24
__PACKAGE__->meta->foreign_keys(
25
  variant_property => {
26
    class       => 'SL::DB::VarientProperty',
27
    key_columns => { variant_property_id => 'id' },
28
  },
29
);
30

  
31
1;
32
;
SL/DB/MetaSetup/VarientPropertyValuePart.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::VarientPropertyValuePart;
4

  
5
use strict;
6

  
7
use parent qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->table('varient_property_values_parts');
10

  
11
__PACKAGE__->meta->columns(
12
  part_id                   => { type => 'integer', not_null => 1 },
13
  variant_property_value_id => { type => 'integer', not_null => 1 },
14
);
15

  
16
__PACKAGE__->meta->primary_key_columns([ 'part_id', 'variant_property_value_id' ]);
17

  
18
__PACKAGE__->meta->unique_keys([ 'variant_property_value_id', 'part_id' ]);
19

  
20
__PACKAGE__->meta->foreign_keys(
21
  part => {
22
    class       => 'SL::DB::Part',
23
    key_columns => { part_id => 'id' },
24
  },
25

  
26
  variant_property_value => {
27
    class       => 'SL::DB::VarientPropertyValue',
28
    key_columns => { variant_property_value_id => 'id' },
29
  },
30
);
31

  
32
1;
33
;
SL/DB/Part.pm
92 92
    class        => 'SL::DB::PurchaseBasketItem',
93 93
    column_map   => { id => 'part_id' },
94 94
  },
95
  varient_properties => {
96
    map_class => 'SL::DB::VarientPropertyPart',
97
    map_from  => 'part',
98
    map_to    => 'variant_property',
99
    type      => 'many to many',
100
  },
101
  varient_porperty_values => {
102
    map_class => 'SL::DB::VarientPropertyValuePart',
103
    map_from  => 'part',
104
    map_to    => 'variant_property_value',
105
    type      => 'many to many',
106
  },
107
  parent_variant => {
108
    map_class => 'SL::DB::PartParentVarientPartVarient',
109
    map_from  => 'variant',
110
    map_to    => 'parent_variant',
111
    type      => 'many to many', #should be 'many to one' but has no map_class
112
  },
113
  varients => {
114
    map_class => 'SL::DB::PartParentVarientPartVarient',
115
    map_from  => 'parent_variant',
116
    map_to    => 'variant',
117
    type      => 'many to many', #should be 'one to many' but has no map_class
118
  }
95 119
);
96 120

  
97 121
__PACKAGE__->meta->initialize;
SL/DB/PartParentVarientPartVarient.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::PartParentVarientPartVarient;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::PartParentVarientPartVarient;
9
use SL::DB::Manager::PartParentVarientPartVarient;
10

  
11
__PACKAGE__->meta->initialize;
12

  
13
1;
SL/DB/TranslationVarientProperty.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::TranslationVarientProperty;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::TranslationVarientProperty;
9
use SL::DB::Manager::TranslationVarientProperty;
10

  
11
__PACKAGE__->meta->initialize;
12

  
13
1;
SL/DB/TranslationVarientPropertyValue.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::TranslationVarientPropertyValue;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::TranslationVarientPropertyValue;
9
use SL::DB::Manager::TranslationVarientPropertyValue;
10

  
11
__PACKAGE__->meta->initialize;
12

  
13
1;
SL/DB/VarientProperty.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::VarientProperty;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::VarientProperty;
9
use SL::DB::Manager::VarientProperty;
10

  
11
__PACKAGE__->meta->add_relationships(
12
  parent_variants => {
13
    map_class => 'SL::DB::VarientPropertyPart',
14
    map_from  => 'variant_property',
15
    map_to    => 'part',
16
    type      => 'many to many',
17
  },
18
);
19

  
20
__PACKAGE__->meta->initialize;
21

  
22
1;
SL/DB/VarientPropertyPart.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::VarientPropertyPart;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::VarientPropertyPart;
9
use SL::DB::Manager::VarientPropertyPart;
10

  
11
__PACKAGE__->meta->initialize;
12

  
13
1;
SL/DB/VarientPropertyValue.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::VarientPropertyValue;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::VarientPropertyValue;
9
use SL::DB::Manager::VarientPropertyValue;
10

  
11
__PACKAGE__->meta->add_relationships(
12
  parent_variants => {
13
    map_class => 'SL::DB::VarientPropertyValuePart',
14
    map_from  => 'variant_property_value',
15
    map_to    => 'part',
16
    type      => 'many to many',
17
  },
18
);
19

  
20
__PACKAGE__->meta->initialize;
21

  
22
1;
SL/DB/VarientPropertyValuePart.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::VarientPropertyValuePart;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::VarientPropertyValuePart;
9
use SL::DB::Manager::VarientPropertyValuePart;
10

  
11
__PACKAGE__->meta->initialize;
12

  
13
1;
SL/TransNumber.pm
92 92
    $filters{table}         = "oe";
93 93
    $filters{where}         = 'COALESCE(quotation, FALSE) AND (vendor_id IS NOT NULL)';
94 94

  
95
  } elsif ($type =~ /^(part|service|assembly|assortment)$/) {
95
  } elsif ($type =~ /^(part|service|assembly|assortment|parent_variant|variant)$/) {
96 96
    $filters{trans_number}  = "partnumber";
97
    my %numberfield_hash = ( service    => 'servicenumber',
98
                             assembly   => 'assemblynumber',
99
                             assortment => 'assortmentnumber',
100
                             part       => 'articlenumber'
97
    my %numberfield_hash = ( service        => 'servicenumber',
98
                             assembly       => 'assemblynumber',
99
                             assortment     => 'assortmentnumber',
100
                             parent_variant => 'parent_variant_number',
101
                             variant        => 'variant_number',
102
                             part           => 'articlenumber'
101 103
                           );
102 104
    $filters{numberfield}   = $numberfield_hash{$type};
103 105
    $filters{table}         = "parts";
sql/Pg-upgrade2/add_variants.sql
1
-- @tag: add_variants
2
-- @description: Neue Tabllen für Variantenartikel
3
-- @depends: release_3_8_0
4
-- @ignore: 0
5

  
6
ALTER TYPE part_type_enum ADD VALUE 'parent_variant';
7
ALTER TYPE part_type_enum ADD VALUE 'variant';
8

  
9
ALTER TABLE defaults ADD parent_variant_number TEXT;
10
ALTER TABLE defaults ADD variant_number TEXT;
11

  
12
CREATE TABLE parts_parent_variant_id_parts_variant_id (
13
  parent_variant_id INTEGER NOT NULL        REFERENCES parts(id),
14
  variant_id        INTEGER NOT NULL UNIQUE REFERENCES parts(id),
15
  PRIMARY KEY (parent_variant_id, variant_id)
16
);
17

  
18
CREATE TABLE variant_properties (
19
  id           SERIAL PRIMARY KEY,
20
  name         TEXT       NOT NULL,
21
  unique_name  TEXT       NOT NULL UNIQUE,
22
  abbreviation VARCHAR(4) NOT NULL,
23
  itime        TIMESTAMP DEFAULT now(),
24
  mtime        TIMESTAMP
25
);
26
CREATE TRIGGER mtime_variant_properties
27
  BEFORE UPDATE ON variant_properties
28
  FOR EACH ROW EXECUTE PROCEDURE set_mtime();
29

  
30
CREATE TABLE varient_properties_parts (
31
  variant_property_id INTEGER NOT NULL REFERENCES variant_properties(id),
32
  part_id             INTEGER NOT NULL REFERENCES parts(id),
33
  PRIMARY KEY (part_id, variant_property_id)
34
);
35

  
36
CREATE TABLE translation_varient_properties (
37
  varient_property_id INTEGER NOT NULL REFERENCES variant_properties(id),
38
  language_id         INTEGER NOT NULL REFERENCES language(id),
39
  name                TEXT    NOT NULL,
40
  itime               TIMESTAMP DEFAULT now(),
41
  mtime               TIMESTAMP,
42
  PRIMARY KEY (varient_property_id, language_id)
43
);
44
CREATE TRIGGER mtime_translation_varient_properties
45
  BEFORE UPDATE ON translation_varient_properties
46
  FOR EACH ROW EXECUTE PROCEDURE set_mtime();
47

  
48
CREATE TABLE variant_property_values (
49
  id                  SERIAL PRIMARY KEY,
50
  variant_property_id INTEGER NOT NULL REFERENCES variant_properties(id),
51
  value               TEXT    NOT NULL,
52
  sortkey             INTEGER NOT NULL,
53
  itime               TIMESTAMP DEFAULT now(),
54
  mtime               TIMESTAMP
55
);
56
CREATE TRIGGER mtime_variant_property_values
57
  BEFORE UPDATE ON variant_property_values
58
  FOR EACH ROW EXECUTE PROCEDURE set_mtime();
59

  
60
CREATE TABLE varient_property_values_parts (
61
  variant_property_value_id INTEGER NOT NULL REFERENCES variant_property_values(id),
62
  part_id                   INTEGER NOT NULL REFERENCES parts(id),
63
  PRIMARY KEY (part_id, variant_property_value_id)
64
);
65

  
66
CREATE TABLE translation_varient_property_values (
67
  varient_property_value_id INTEGER NOT NULL REFERENCES variant_property_values(id),
68
  language_id               INTEGER NOT NULL REFERENCES language(id),
69
  value                     TEXT    NOT NULL,
70
  itime                     TIMESTAMP DEFAULT now(),
71
  mtime                     TIMESTAMP,
72
  PRIMARY KEY (varient_property_value_id, language_id)
73
);
74
CREATE TRIGGER mtime_translation_varient_property_values
75
  BEFORE UPDATE ON translation_varient_property_values
76
  FOR EACH ROW EXECUTE PROCEDURE set_mtime();
templates/design40_webpages/client_config/_ranges_of_numbers.html
104 104
      <td>[% L.input_tag("defaults.assortmentnumber", SELF.defaults.assortmentnumber, size="15", class="wi-normal") %]</td>
105 105
      [% END %]
106 106
    </tr>
107
    <tr>
108
      <th>[% LxERP.t8('Parent Variant') %]</th>
109
      <td>[% L.input_tag("defaults.parent_variant_number", SELF.defaults.parent_variant_number, size="15", class="wi-normal") %]</td>
110
    </tr>
111
    <tr>
112
      <th>[% LxERP.t8('Variant') %]</th>
113
      <td>[% L.input_tag("defaults.variant_number", SELF.defaults.variant_number, size="15", class="wi-normal") %]</td>
114
    </tr>
107 115
  </tbody>
108 116
</table>
109 117

  
templates/webpages/client_config/_ranges_of_numbers.html
72 72
  <tr>
73 73
   <td align="right" nowrap>[% LxERP.t8('Last Purchase Delivery Order Number') %]</td>
74 74
   <td>[% L.input_tag("defaults.pdonumber", SELF.defaults.pdonumber, size="15") %]</td>
75
   <td align="right" nowrap>[% LxERP.t8('Last Parent Variant Number') %]</td>
76
   <td>[% L.input_tag("defaults.parent_variant_number", SELF.defaults.parent_variant_number, size="15") %]</td>
75 77
  </tr>
76 78

  
77 79
  <tr>
78 80
   <td align="right" nowrap>[% LxERP.t8('Last Supplier Delivery Order Number') %]</td>
79 81
   <td>[% L.input_tag("defaults.sudonumber", SELF.defaults.sudonumber, size="15") %]</td>
82
   <td align="right" nowrap>[% LxERP.t8('Last Variant Number') %]</td>
83
   <td>[% L.input_tag("defaults.variant_number", SELF.defaults.variant_number, size="15") %]</td>
80 84
  </tr>
81 85

  
82 86
  <tr>

Auch abrufbar als: Unified diff