Revision 59b16044
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
| SL/DB/Helper/ALL.pm | ||
|---|---|---|
| use SL::DB::Part;
 | ||
| use SL::DB::PartClassification;
 | ||
| use SL::DB::PartCustomerPrice;
 | ||
| use SL::DB::PartParentVariantPartVariant;
 | ||
| use SL::DB::PartsGroup;
 | ||
| use SL::DB::PartsPriceHistory;
 | ||
| use SL::DB::PaymentTerm;
 | ||
| ... | ... | |
| use SL::DB::TodoUserConfig;
 | ||
| use SL::DB::TransferType;
 | ||
| use SL::DB::Translation;
 | ||
| use SL::DB::TranslationVariantProperty;
 | ||
| use SL::DB::TranslationVariantPropertyValue;
 | ||
| use SL::DB::TriggerInformation;
 | ||
| use SL::DB::Unit;
 | ||
| use SL::DB::UnitsLanguage;
 | ||
| use SL::DB::UserPreference;
 | ||
| use SL::DB::VC;
 | ||
| use SL::DB::ValidityToken;
 | ||
| use SL::DB::VariantProperty;
 | ||
| use SL::DB::VariantPropertyPart;
 | ||
| use SL::DB::VariantPropertyValue;
 | ||
| use SL::DB::VariantPropertyValuePart;
 | ||
| use SL::DB::Vendor;
 | ||
| use SL::DB::Warehouse;
 | ||
|  | ||
| SL/DB/Helper/Mappings.pm | ||
|---|---|---|
|   oe                             => 'order',
 | ||
|   oe_version                     => 'order_version',
 | ||
|   parts                          => 'part',
 | ||
|   parts_parent_variant_id_parts_variant_id => 'PartParentVariantPartVariant',
 | ||
|   partsgroup                     => 'parts_group',
 | ||
|   part_classifications           => 'PartClassification',
 | ||
|   part_customer_prices           => 'PartCustomerPrice',
 | ||
| ... | ... | |
|   todo_user_config               => 'todo_user_config',
 | ||
|   transfer_type                  => 'transfer_type',
 | ||
|   translation                    => 'translation',
 | ||
|   translation_variant_properties => 'TranslationVariantProperty',
 | ||
|   translation_variant_property_values => 'TranslationVariantPropertyValue',
 | ||
|   trigger_information            => 'trigger_information',
 | ||
|   units                          => 'unit',
 | ||
|   units_language                 => 'units_language',
 | ||
|   user_preferences               => 'user_preference',
 | ||
|   validity_tokens                => 'ValidityToken',
 | ||
|   variant_properties             => 'VariantProperty',
 | ||
|   variant_properties_parts       => 'VariantPropertyPart',
 | ||
|   variant_property_values        => 'VariantPropertyValue',
 | ||
|   variant_property_values_parts  => 'VariantPropertyValuePart',
 | ||
|   vendor                         => 'vendor',
 | ||
|   warehouse                      => 'warehouse',
 | ||
| );
 | ||
| SL/DB/Helper/TransNumberGenerator.pm | ||
|---|---|---|
|               service                     => { number_column => 'partnumber',     number_range_column => 'servicenumber',                              },
 | ||
|               assembly                    => { number_column => 'partnumber',     number_range_column => 'assemblynumber',                             },
 | ||
|               assortment                  => { number_column => 'partnumber',     number_range_column => 'assortmentnumber',                           },
 | ||
|               parent_variant              => { number_column => 'partnumber',     number_range_column => 'parent_variant_number',                      },
 | ||
|               variant                     => { number_column => 'partnumber',     number_range_column => 'variant_number',                             },
 | ||
|             );
 | ||
|  | ||
| sub get_next_trans_number {
 | ||
| SL/DB/Manager/PartParentVariantPartVariant.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::Manager::PartParentVariantPartVariant;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Helper::Manager);
 | ||
|  | ||
| sub object_class { 'SL::DB::PartParentVariantPartVariant' }
 | ||
|  | ||
| __PACKAGE__->make_manager_methods;
 | ||
|  | ||
| 1;
 | ||
| SL/DB/Manager/TranslationVariantProperty.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::Manager::TranslationVariantProperty;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Helper::Manager);
 | ||
|  | ||
| sub object_class { 'SL::DB::TranslationVariantProperty' }
 | ||
|  | ||
| __PACKAGE__->make_manager_methods;
 | ||
|  | ||
| 1;
 | ||
| SL/DB/Manager/TranslationVariantPropertyValue.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::Manager::TranslationVariantPropertyValue;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Helper::Manager);
 | ||
|  | ||
| sub object_class { 'SL::DB::TranslationVariantPropertyValue' }
 | ||
|  | ||
| __PACKAGE__->make_manager_methods;
 | ||
|  | ||
| 1;
 | ||
| SL/DB/Manager/VariantProperty.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::Manager::VariantProperty;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Helper::Manager);
 | ||
|  | ||
| sub object_class { 'SL::DB::VariantProperty' }
 | ||
|  | ||
| __PACKAGE__->make_manager_methods;
 | ||
|  | ||
| 1;
 | ||
| SL/DB/Manager/VariantPropertyPart.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::Manager::VariantPropertyPart;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Helper::Manager);
 | ||
|  | ||
| sub object_class { 'SL::DB::VariantPropertyPart' }
 | ||
|  | ||
| __PACKAGE__->make_manager_methods;
 | ||
|  | ||
| 1;
 | ||
| SL/DB/Manager/VariantPropertyValue.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::Manager::VariantPropertyValue;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Helper::Manager);
 | ||
|  | ||
| sub object_class { 'SL::DB::VariantPropertyValue' }
 | ||
|  | ||
| __PACKAGE__->make_manager_methods;
 | ||
|  | ||
| 1;
 | ||
| SL/DB/Manager/VariantPropertyValuePart.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::Manager::VariantPropertyValuePart;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Helper::Manager);
 | ||
|  | ||
| sub object_class { 'SL::DB::VariantPropertyValuePart' }
 | ||
|  | ||
| __PACKAGE__->make_manager_methods;
 | ||
|  | ||
| 1;
 | ||
| SL/DB/MetaSetup/Default.pm | ||
|---|---|---|
|   order_warn_no_cusordnumber                => { type => 'boolean', default => 'false' },
 | ||
|   order_warn_no_deliverydate                => { type => 'boolean', default => 'true' },
 | ||
|   p_reclamation_record_number               => { type => 'text', default => '0', not_null => 1 },
 | ||
|   parent_variant_number                     => { type => 'text' },
 | ||
|   parts_image_css                           => { type => 'text', default => 'border:0;float:left;max-width:250px;margin-top:20px:margin-right:10px;margin-left:10px;' },
 | ||
|   parts_listing_image                       => { type => 'boolean', default => 'true' },
 | ||
|   parts_show_image                          => { type => 'boolean', default => 'true' },
 | ||
| ... | ... | |
|   transit_items_chart_id                    => { type => 'integer' },
 | ||
|   transport_cost_reminder_article_number_id => { type => 'integer' },
 | ||
|   undo_transfer_interval                    => { type => 'integer', default => 7 },
 | ||
|   variant_number                            => { type => 'text' },
 | ||
|   vc_greetings_use_textfield                => { type => 'boolean' },
 | ||
|   vendor_ustid_taxnummer_unique             => { type => 'boolean', default => 'false' },
 | ||
|   vendornumber                              => { type => 'text' },
 | ||
| SL/DB/MetaSetup/Part.pm | ||
|---|---|---|
|   onhand             => { type => 'numeric', default => '0', precision => 25, scale => 5 },
 | ||
|   order_locked       => { type => 'boolean', default => 'false' },
 | ||
|   order_qty          => { type => 'numeric', default => '0', not_null => 1, precision => 15, scale => 5 },
 | ||
|   part_type          => { type => 'enum', check_in => [ 'part', 'service', 'assembly', 'assortment' ], db_type => 'part_type_enum', not_null => 1 },
 | ||
|   part_type          => { type => 'enum', check_in => [ 'part', 'service', 'assembly', 'assortment', 'parent_variant', 'variant' ], db_type => 'part_type_enum', not_null => 1 },
 | ||
|   partnumber         => { type => 'text', not_null => 1 },
 | ||
|   partsgroup_id      => { type => 'integer' },
 | ||
|   payment_id         => { type => 'integer' },
 | ||
| SL/DB/MetaSetup/PartParentVariantPartVariant.pm | ||
|---|---|---|
| # This file has been auto-generated. Do not modify it; it will be overwritten
 | ||
| # by rose_auto_create_model.pl automatically.
 | ||
| package SL::DB::PartParentVariantPartVariant;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Object);
 | ||
|  | ||
| __PACKAGE__->meta->table('parts_parent_variant_id_parts_variant_id');
 | ||
|  | ||
| __PACKAGE__->meta->columns(
 | ||
|   parent_variant_id => { type => 'integer', not_null => 1 },
 | ||
|   variant_id        => { type => 'integer', not_null => 1 },
 | ||
| );
 | ||
|  | ||
| __PACKAGE__->meta->primary_key_columns([ 'parent_variant_id', 'variant_id' ]);
 | ||
|  | ||
| __PACKAGE__->meta->unique_keys([ 'variant_id' ]);
 | ||
|  | ||
| __PACKAGE__->meta->foreign_keys(
 | ||
|   parent_variant => {
 | ||
|     class       => 'SL::DB::Part',
 | ||
|     key_columns => { parent_variant_id => 'id' },
 | ||
|   },
 | ||
|  | ||
|   variant => {
 | ||
|     class       => 'SL::DB::Part',
 | ||
|     key_columns => { variant_id => 'id' },
 | ||
|     rel_type    => 'one to one',
 | ||
|   },
 | ||
| );
 | ||
|  | ||
| 1;
 | ||
| ;
 | ||
| SL/DB/MetaSetup/TranslationVariantProperty.pm | ||
|---|---|---|
| # This file has been auto-generated. Do not modify it; it will be overwritten
 | ||
| # by rose_auto_create_model.pl automatically.
 | ||
| package SL::DB::TranslationVariantProperty;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Object);
 | ||
|  | ||
| __PACKAGE__->meta->table('translation_variant_properties');
 | ||
|  | ||
| __PACKAGE__->meta->columns(
 | ||
|   itime               => { type => 'timestamp', default => 'now()' },
 | ||
|   language_id         => { type => 'integer', not_null => 1 },
 | ||
|   mtime               => { type => 'timestamp' },
 | ||
|   name                => { type => 'text', not_null => 1 },
 | ||
|   variant_property_id => { type => 'integer', not_null => 1 },
 | ||
| );
 | ||
|  | ||
| __PACKAGE__->meta->primary_key_columns([ 'variant_property_id', 'language_id' ]);
 | ||
|  | ||
| __PACKAGE__->meta->allow_inline_column_values(1);
 | ||
|  | ||
| __PACKAGE__->meta->foreign_keys(
 | ||
|   language => {
 | ||
|     class       => 'SL::DB::Language',
 | ||
|     key_columns => { language_id => 'id' },
 | ||
|   },
 | ||
|  | ||
|   variant_property => {
 | ||
|     class       => 'SL::DB::VariantProperty',
 | ||
|     key_columns => { variant_property_id => 'id' },
 | ||
|   },
 | ||
| );
 | ||
|  | ||
| 1;
 | ||
| ;
 | ||
| SL/DB/MetaSetup/TranslationVariantPropertyValue.pm | ||
|---|---|---|
| # This file has been auto-generated. Do not modify it; it will be overwritten
 | ||
| # by rose_auto_create_model.pl automatically.
 | ||
| package SL::DB::TranslationVariantPropertyValue;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Object);
 | ||
|  | ||
| __PACKAGE__->meta->table('translation_variant_property_values');
 | ||
|  | ||
| __PACKAGE__->meta->columns(
 | ||
|   itime                     => { type => 'timestamp', default => 'now()' },
 | ||
|   language_id               => { type => 'integer', not_null => 1 },
 | ||
|   mtime                     => { type => 'timestamp' },
 | ||
|   value                     => { type => 'text', not_null => 1 },
 | ||
|   variant_property_value_id => { type => 'integer', not_null => 1 },
 | ||
| );
 | ||
|  | ||
| __PACKAGE__->meta->primary_key_columns([ 'variant_property_value_id', 'language_id' ]);
 | ||
|  | ||
| __PACKAGE__->meta->allow_inline_column_values(1);
 | ||
|  | ||
| __PACKAGE__->meta->foreign_keys(
 | ||
|   language => {
 | ||
|     class       => 'SL::DB::Language',
 | ||
|     key_columns => { language_id => 'id' },
 | ||
|   },
 | ||
|  | ||
|   variant_property_value => {
 | ||
|     class       => 'SL::DB::VariantPropertyValue',
 | ||
|     key_columns => { variant_property_value_id => 'id' },
 | ||
|   },
 | ||
| );
 | ||
|  | ||
| 1;
 | ||
| ;
 | ||
| SL/DB/MetaSetup/VariantProperty.pm | ||
|---|---|---|
| # This file has been auto-generated. Do not modify it; it will be overwritten
 | ||
| # by rose_auto_create_model.pl automatically.
 | ||
| package SL::DB::VariantProperty;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Object);
 | ||
|  | ||
| __PACKAGE__->meta->table('variant_properties');
 | ||
|  | ||
| __PACKAGE__->meta->columns(
 | ||
|   abbreviation => { type => 'varchar', length => 4, not_null => 1 },
 | ||
|   id           => { type => 'serial', not_null => 1 },
 | ||
|   itime        => { type => 'timestamp', default => 'now()' },
 | ||
|   mtime        => { type => 'timestamp' },
 | ||
|   name         => { type => 'text', not_null => 1 },
 | ||
|   unique_name  => { type => 'text', not_null => 1 },
 | ||
| );
 | ||
|  | ||
| __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 | ||
|  | ||
| __PACKAGE__->meta->unique_keys([ 'unique_name' ]);
 | ||
|  | ||
| __PACKAGE__->meta->allow_inline_column_values(1);
 | ||
|  | ||
| 1;
 | ||
| ;
 | ||
| SL/DB/MetaSetup/VariantPropertyPart.pm | ||
|---|---|---|
| # This file has been auto-generated. Do not modify it; it will be overwritten
 | ||
| # by rose_auto_create_model.pl automatically.
 | ||
| package SL::DB::VariantPropertyPart;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Object);
 | ||
|  | ||
| __PACKAGE__->meta->table('variant_properties_parts');
 | ||
|  | ||
| __PACKAGE__->meta->columns(
 | ||
|   part_id             => { type => 'integer', not_null => 1 },
 | ||
|   variant_property_id => { type => 'integer', not_null => 1 },
 | ||
| );
 | ||
|  | ||
| __PACKAGE__->meta->primary_key_columns([ 'part_id', 'variant_property_id' ]);
 | ||
|  | ||
| __PACKAGE__->meta->unique_keys([ 'variant_property_id', 'part_id' ]);
 | ||
|  | ||
| __PACKAGE__->meta->foreign_keys(
 | ||
|   part => {
 | ||
|     class       => 'SL::DB::Part',
 | ||
|     key_columns => { part_id => 'id' },
 | ||
|   },
 | ||
|  | ||
|   variant_property => {
 | ||
|     class       => 'SL::DB::VariantProperty',
 | ||
|     key_columns => { variant_property_id => 'id' },
 | ||
|   },
 | ||
| );
 | ||
|  | ||
| 1;
 | ||
| ;
 | ||
| SL/DB/MetaSetup/VariantPropertyValue.pm | ||
|---|---|---|
| # This file has been auto-generated. Do not modify it; it will be overwritten
 | ||
| # by rose_auto_create_model.pl automatically.
 | ||
| package SL::DB::VariantPropertyValue;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Object);
 | ||
|  | ||
| __PACKAGE__->meta->table('variant_property_values');
 | ||
|  | ||
| __PACKAGE__->meta->columns(
 | ||
|   abbreviation        => { type => 'varchar', length => 4, not_null => 1 },
 | ||
|   id                  => { type => 'serial', not_null => 1 },
 | ||
|   itime               => { type => 'timestamp', default => 'now()' },
 | ||
|   mtime               => { type => 'timestamp' },
 | ||
|   sortkey             => { type => 'integer', not_null => 1 },
 | ||
|   value               => { type => 'text', not_null => 1 },
 | ||
|   variant_property_id => { type => 'integer', not_null => 1 },
 | ||
| );
 | ||
|  | ||
| __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 | ||
|  | ||
| __PACKAGE__->meta->allow_inline_column_values(1);
 | ||
|  | ||
| __PACKAGE__->meta->foreign_keys(
 | ||
|   variant_property => {
 | ||
|     class       => 'SL::DB::VariantProperty',
 | ||
|     key_columns => { variant_property_id => 'id' },
 | ||
|   },
 | ||
| );
 | ||
|  | ||
| 1;
 | ||
| ;
 | ||
| SL/DB/MetaSetup/VariantPropertyValuePart.pm | ||
|---|---|---|
| # This file has been auto-generated. Do not modify it; it will be overwritten
 | ||
| # by rose_auto_create_model.pl automatically.
 | ||
| package SL::DB::VariantPropertyValuePart;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use parent qw(SL::DB::Object);
 | ||
|  | ||
| __PACKAGE__->meta->table('variant_property_values_parts');
 | ||
|  | ||
| __PACKAGE__->meta->columns(
 | ||
|   part_id                   => { type => 'integer', not_null => 1 },
 | ||
|   variant_property_value_id => { type => 'integer', not_null => 1 },
 | ||
| );
 | ||
|  | ||
| __PACKAGE__->meta->primary_key_columns([ 'part_id', 'variant_property_value_id' ]);
 | ||
|  | ||
| __PACKAGE__->meta->unique_keys([ 'variant_property_value_id', 'part_id' ]);
 | ||
|  | ||
| __PACKAGE__->meta->foreign_keys(
 | ||
|   part => {
 | ||
|     class       => 'SL::DB::Part',
 | ||
|     key_columns => { part_id => 'id' },
 | ||
|   },
 | ||
|  | ||
|   variant_property_value => {
 | ||
|     class       => 'SL::DB::VariantPropertyValue',
 | ||
|     key_columns => { variant_property_value_id => 'id' },
 | ||
|   },
 | ||
| );
 | ||
|  | ||
| 1;
 | ||
| ;
 | ||
| SL/DB/Part.pm | ||
|---|---|---|
|     class        => 'SL::DB::PurchaseBasketItem',
 | ||
|     column_map   => { id => 'part_id' },
 | ||
|   },
 | ||
|   variant_properties => {
 | ||
|     map_class => 'SL::DB::VariantPropertyPart',
 | ||
|     map_from  => 'part',
 | ||
|     map_to    => 'variant_property',
 | ||
|     type      => 'many to many',
 | ||
|   },
 | ||
|   variant_porperty_values => {
 | ||
|     map_class => 'SL::DB::VariantPropertyValuePart',
 | ||
|     map_from  => 'part',
 | ||
|     map_to    => 'variant_property_value',
 | ||
|     type      => 'many to many',
 | ||
|   },
 | ||
|   parent_variant => {
 | ||
|     map_class => 'SL::DB::PartParentVariantPartVariant',
 | ||
|     map_from  => 'variant',
 | ||
|     map_to    => 'parent_variant',
 | ||
|     type      => 'many to many', #should be 'many to one' but has no map_class
 | ||
|   },
 | ||
|   variants => {
 | ||
|     map_class => 'SL::DB::PartParentVariantPartVariant',
 | ||
|     map_from  => 'parent_variant',
 | ||
|     map_to    => 'variant',
 | ||
|     type      => 'many to many', #should be 'one to many' but has no map_class
 | ||
|   }
 | ||
| );
 | ||
|  | ||
| __PACKAGE__->meta->initialize;
 | ||
| ... | ... | |
| sub is_type {
 | ||
|   my $self = shift;
 | ||
|   my $type  = lc(shift || '');
 | ||
|   die 'invalid type' unless $type =~ /^(?:part|service|assembly|assortment)$/;
 | ||
|   die 'invalid type' unless $type =~ /^(?:part|service|assembly|assortment|parent_variant|variant)$/;
 | ||
|  | ||
|   return $self->type eq $type ? 1 : 0;
 | ||
| }
 | ||
|  | ||
| sub is_part       { $_[0]->part_type eq 'part'       }
 | ||
| sub is_assembly   { $_[0]->part_type eq 'assembly'   }
 | ||
| sub is_service    { $_[0]->part_type eq 'service'    }
 | ||
| sub is_assortment { $_[0]->part_type eq 'assortment' }
 | ||
|  | ||
| sub type {
 | ||
|   return $_[0]->part_type;
 | ||
|   # my ($self, $type) = @_;
 | ||
|   # if (@_ > 1) {
 | ||
|   #   die 'invalid type' unless $type =~ /^(?:part|service|assembly)$/;
 | ||
|   #   $self->assembly(          $type eq 'assembly' ? 1 : 0);
 | ||
|   #   $self->inventory_accno_id($type ne 'service'  ? 1 : undef);
 | ||
|   # }
 | ||
| sub is_part           { $_[0]->part_type eq 'part'       }
 | ||
| sub is_assembly       { $_[0]->part_type eq 'assembly'   }
 | ||
| sub is_service        { $_[0]->part_type eq 'service'    }
 | ||
| sub is_assortment     { $_[0]->part_type eq 'assortment' }
 | ||
| sub is_parent_varient { $_[0]->part_type eq 'parent_variant' }
 | ||
| sub is_varient        { $_[0]->part_type eq 'variant' }
 | ||
|  | ||
|   # return 'assembly' if $self->assembly;
 | ||
|   # return 'part'     if $self->inventory_accno_id;
 | ||
|   # return 'service';
 | ||
| }
 | ||
| sub type { return $_[0]->part_type; }
 | ||
|  | ||
| sub new_part {
 | ||
|   my ($class, %params) = @_;
 | ||
| ... | ... | |
|   $class->new(%params, part_type => 'assortment');
 | ||
| }
 | ||
|  | ||
| sub new_parent_variant {
 | ||
|   my ($class, %params) = @_;
 | ||
|   $class->new(%params, part_type => 'parent_variant');
 | ||
| }
 | ||
|  | ||
| sub new_variant {
 | ||
|   my ($class, %params) = @_;
 | ||
|   $class->new(%params, part_type => 'variant');
 | ||
| }
 | ||
|  | ||
| sub last_modification {
 | ||
|   my ($self) = @_;
 | ||
|   return $self->mtime // $self->itime;
 | ||
| SL/DB/PartParentVariantPartVariant.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::PartParentVariantPartVariant;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use SL::DB::MetaSetup::PartParentVariantPartVariant;
 | ||
| use SL::DB::Manager::PartParentVariantPartVariant;
 | ||
|  | ||
| __PACKAGE__->meta->initialize;
 | ||
|  | ||
| 1;
 | ||
| SL/DB/TranslationVariantProperty.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::TranslationVariantProperty;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use SL::DB::MetaSetup::TranslationVariantProperty;
 | ||
| use SL::DB::Manager::TranslationVariantProperty;
 | ||
|  | ||
| __PACKAGE__->meta->initialize;
 | ||
|  | ||
| 1;
 | ||
| SL/DB/TranslationVariantPropertyValue.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::TranslationVariantPropertyValue;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use SL::DB::MetaSetup::TranslationVariantPropertyValue;
 | ||
| use SL::DB::Manager::TranslationVariantPropertyValue;
 | ||
|  | ||
| __PACKAGE__->meta->initialize;
 | ||
|  | ||
| 1;
 | ||
| SL/DB/VariantProperty.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::VariantProperty;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use SL::DB::MetaSetup::VariantProperty;
 | ||
| use SL::DB::Manager::VariantProperty;
 | ||
|  | ||
| __PACKAGE__->meta->add_relationships(
 | ||
|   parent_variants => {
 | ||
|     map_class => 'SL::DB::VariantPropertyPart',
 | ||
|     map_from  => 'variant_property',
 | ||
|     map_to    => 'part',
 | ||
|     type      => 'many to many',
 | ||
|   },
 | ||
| );
 | ||
|  | ||
| __PACKAGE__->meta->initialize;
 | ||
|  | ||
| 1;
 | ||
| SL/DB/VariantPropertyPart.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::VariantPropertyPart;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use SL::DB::MetaSetup::VariantPropertyPart;
 | ||
| use SL::DB::Manager::VariantPropertyPart;
 | ||
|  | ||
| __PACKAGE__->meta->initialize;
 | ||
|  | ||
| 1;
 | ||
| SL/DB/VariantPropertyValue.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::VariantPropertyValue;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use SL::DB::MetaSetup::VariantPropertyValue;
 | ||
| use SL::DB::Manager::VariantPropertyValue;
 | ||
|  | ||
| __PACKAGE__->meta->add_relationships(
 | ||
|   parent_variants => {
 | ||
|     map_class => 'SL::DB::VariantPropertyValuePart',
 | ||
|     map_from  => 'variant_property_value',
 | ||
|     map_to    => 'part',
 | ||
|     type      => 'many to many',
 | ||
|   },
 | ||
| );
 | ||
|  | ||
| __PACKAGE__->meta->initialize;
 | ||
|  | ||
| 1;
 | ||
| SL/DB/VariantPropertyValuePart.pm | ||
|---|---|---|
| # This file has been auto-generated only because it didn't exist.
 | ||
| # Feel free to modify it at will; it will not be overwritten automatically.
 | ||
|  | ||
| package SL::DB::VariantPropertyValuePart;
 | ||
|  | ||
| use strict;
 | ||
|  | ||
| use SL::DB::MetaSetup::VariantPropertyValuePart;
 | ||
| use SL::DB::Manager::VariantPropertyValuePart;
 | ||
|  | ||
| __PACKAGE__->meta->initialize;
 | ||
|  | ||
| 1;
 | ||
| SL/TransNumber.pm | ||
|---|---|---|
|     $filters{table}         = "oe";
 | ||
|     $filters{where}         = 'COALESCE(quotation, FALSE) AND (vendor_id IS NOT NULL)';
 | ||
|  | ||
|   } elsif ($type =~ /^(part|service|assembly|assortment)$/) {
 | ||
|   } elsif ($type =~ /^(part|service|assembly|assortment|parent_variant|variant)$/) {
 | ||
|     $filters{trans_number}  = "partnumber";
 | ||
|     my %numberfield_hash = ( service    => 'servicenumber',
 | ||
|                              assembly   => 'assemblynumber',
 | ||
|                              assortment => 'assortmentnumber',
 | ||
|                              part       => 'articlenumber'
 | ||
|     my %numberfield_hash = ( service        => 'servicenumber',
 | ||
|                              assembly       => 'assemblynumber',
 | ||
|                              assortment     => 'assortmentnumber',
 | ||
|                              parent_variant => 'parent_variant_number',
 | ||
|                              variant        => 'variant_number',
 | ||
|                              part           => 'articlenumber'
 | ||
|                            );
 | ||
|     $filters{numberfield}   = $numberfield_hash{$type};
 | ||
|     $filters{table}         = "parts";
 | ||
| sql/Pg-upgrade2/add_variants.sql | ||
|---|---|---|
| -- @tag: add_variants
 | ||
| -- @description: Neue Tabllen für Variantenartikel
 | ||
| -- @depends: release_3_8_0
 | ||
| -- @ignore: 0
 | ||
|  | ||
| ALTER TYPE part_type_enum ADD VALUE 'parent_variant';
 | ||
| ALTER TYPE part_type_enum ADD VALUE 'variant';
 | ||
|  | ||
| ALTER TABLE defaults ADD parent_variant_number TEXT;
 | ||
| ALTER TABLE defaults ADD variant_number TEXT;
 | ||
|  | ||
| CREATE TABLE parts_parent_variant_id_parts_variant_id (
 | ||
|   parent_variant_id INTEGER NOT NULL        REFERENCES parts(id),
 | ||
|   variant_id        INTEGER NOT NULL UNIQUE REFERENCES parts(id),
 | ||
|   PRIMARY KEY (parent_variant_id, variant_id)
 | ||
| );
 | ||
|  | ||
| CREATE TABLE variant_properties (
 | ||
|   id           SERIAL PRIMARY KEY,
 | ||
|   name         TEXT       NOT NULL,
 | ||
|   unique_name  TEXT       NOT NULL UNIQUE,
 | ||
|   abbreviation VARCHAR(4) NOT NULL,
 | ||
|   itime        TIMESTAMP DEFAULT now(),
 | ||
|   mtime        TIMESTAMP
 | ||
| );
 | ||
| CREATE TRIGGER mtime_variant_properties
 | ||
|   BEFORE UPDATE ON variant_properties
 | ||
|   FOR EACH ROW EXECUTE PROCEDURE set_mtime();
 | ||
|  | ||
| CREATE TABLE variant_properties_parts (
 | ||
|   variant_property_id INTEGER NOT NULL REFERENCES variant_properties(id),
 | ||
|   part_id             INTEGER NOT NULL REFERENCES parts(id),
 | ||
|   PRIMARY KEY (part_id, variant_property_id)
 | ||
| );
 | ||
|  | ||
| CREATE TABLE translation_variant_properties (
 | ||
|   variant_property_id INTEGER NOT NULL REFERENCES variant_properties(id),
 | ||
|   language_id         INTEGER NOT NULL REFERENCES language(id),
 | ||
|   name                TEXT    NOT NULL,
 | ||
|   itime               TIMESTAMP DEFAULT now(),
 | ||
|   mtime               TIMESTAMP,
 | ||
|   PRIMARY KEY (variant_property_id, language_id)
 | ||
| );
 | ||
| CREATE TRIGGER mtime_translation_variant_properties
 | ||
|   BEFORE UPDATE ON translation_variant_properties
 | ||
|   FOR EACH ROW EXECUTE PROCEDURE set_mtime();
 | ||
|  | ||
| CREATE TABLE variant_property_values (
 | ||
|   id                  SERIAL PRIMARY KEY,
 | ||
|   variant_property_id INTEGER NOT NULL REFERENCES variant_properties(id),
 | ||
|   value               TEXT    NOT NULL,
 | ||
|   abbreviation        VARCHAR(4) NOT NULL,
 | ||
|   sortkey             INTEGER NOT NULL,
 | ||
|   itime               TIMESTAMP DEFAULT now(),
 | ||
|   mtime               TIMESTAMP
 | ||
| );
 | ||
| CREATE TRIGGER mtime_variant_property_values
 | ||
|   BEFORE UPDATE ON variant_property_values
 | ||
|   FOR EACH ROW EXECUTE PROCEDURE set_mtime();
 | ||
|  | ||
| CREATE TABLE variant_property_values_parts (
 | ||
|   variant_property_value_id INTEGER NOT NULL REFERENCES variant_property_values(id),
 | ||
|   part_id                   INTEGER NOT NULL REFERENCES parts(id),
 | ||
|   PRIMARY KEY (part_id, variant_property_value_id)
 | ||
| );
 | ||
|  | ||
| CREATE TABLE translation_variant_property_values (
 | ||
|   variant_property_value_id INTEGER NOT NULL REFERENCES variant_property_values(id),
 | ||
|   language_id               INTEGER NOT NULL REFERENCES language(id),
 | ||
|   value                     TEXT    NOT NULL,
 | ||
|   itime                     TIMESTAMP DEFAULT now(),
 | ||
|   mtime                     TIMESTAMP,
 | ||
|   PRIMARY KEY (variant_property_value_id, language_id)
 | ||
| );
 | ||
| CREATE TRIGGER mtime_translation_variant_property_values
 | ||
|   BEFORE UPDATE ON translation_variant_property_values
 | ||
|   FOR EACH ROW EXECUTE PROCEDURE set_mtime();
 | ||
| t/006spellcheck.t | ||
|---|---|---|
| sytle
 | ||
| unkown
 | ||
| varsion
 | ||
| varient
 | ||
| wether
 | ||
| );
 | ||
|  | ||
| templates/design40_webpages/client_config/_ranges_of_numbers.html | ||
|---|---|---|
|       <td>[% L.input_tag("defaults.assortmentnumber", SELF.defaults.assortmentnumber, size="15", class="wi-normal") %]</td>
 | ||
|       [% END %]
 | ||
|     </tr>
 | ||
|     <tr>
 | ||
|       <th>[% LxERP.t8('Parent Variant') %]</th>
 | ||
|       <td>[% L.input_tag("defaults.parent_variant_number", SELF.defaults.parent_variant_number, size="15", class="wi-normal") %]</td>
 | ||
|     </tr>
 | ||
|     <tr>
 | ||
|       <th>[% LxERP.t8('Variant') %]</th>
 | ||
|       <td>[% L.input_tag("defaults.variant_number", SELF.defaults.variant_number, size="15", class="wi-normal") %]</td>
 | ||
|     </tr>
 | ||
|   </tbody>
 | ||
| </table>
 | ||
|  | ||
| templates/webpages/client_config/_ranges_of_numbers.html | ||
|---|---|---|
|   <tr>
 | ||
|    <td align="right" nowrap>[% LxERP.t8('Last Purchase Delivery Order Number') %]</td>
 | ||
|    <td>[% L.input_tag("defaults.pdonumber", SELF.defaults.pdonumber, size="15") %]</td>
 | ||
|    <td align="right" nowrap>[% LxERP.t8('Last Parent Variant Number') %]</td>
 | ||
|    <td>[% L.input_tag("defaults.parent_variant_number", SELF.defaults.parent_variant_number, size="15") %]</td>
 | ||
|   </tr>
 | ||
|  | ||
|   <tr>
 | ||
|    <td align="right" nowrap>[% LxERP.t8('Last Supplier Delivery Order Number') %]</td>
 | ||
|    <td>[% L.input_tag("defaults.sudonumber", SELF.defaults.sudonumber, size="15") %]</td>
 | ||
|    <td align="right" nowrap>[% LxERP.t8('Last Variant Number') %]</td>
 | ||
|    <td>[% L.input_tag("defaults.variant_number", SELF.defaults.variant_number, size="15") %]</td>
 | ||
|   </tr>
 | ||
|  | ||
|   <tr>
 | ||
Auch abrufbar als: Unified diff
Varianten: SQL-Scripte und ROSE-DB Dateien erstellt