Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 19e40226

Von Jan Büren vor etwa 9 Jahren hinzugefügt

  • ID 19e4022642c1fd958850244ec4896f964519e563
  • Vorgänger 1640d2ad
  • Nachfolger bbdaf8b0

Kosmetik für Feature Projektpflicht bei Verkaufsaufträgen

Unterschiede anzeigen:

SL/Controller/ClientConfig.pm
144 144
sub init_all_warehouses  { SL::DB::Manager::Warehouse->get_all_sorted                                                    }
145 145
sub init_all_languages   { SL::DB::Manager::Language->get_all_sorted                                                     }
146 146
sub init_all_currencies  { SL::DB::Manager::Currency->get_all_sorted                                                     }
147
sub init_all_project_types    { SL::DB::Manager::ProjectType->get_all_sorted                                             }
148
sub init_all_project_statuses { SL::DB::Manager::ProjectStatus->get_all_sorted                                           }
149 147
sub init_all_weightunits { my $unit = SL::DB::Manager::Unit->find_by(name => 'kg'); $unit ? $unit->convertible_units : [] }
150 148
sub init_all_templates   { +{ SL::Template->available_templates }                                                        }
151 149
sub init_h_unit_name     { first { SL::DB::Manager::Unit->find_by(name => $_) } qw(Std h Stunde)                         };
150
sub init_all_project_types    { SL::DB::Manager::ProjectType->get_all_sorted                                             }
151
sub init_all_project_statuses { SL::DB::Manager::ProjectStatus->get_all_sorted                                           }
152 152

  
153 153
sub init_posting_options {
154 154
  [ { title => t8("never"),           value => 0           },
SL/OE.pm
535 535
      $pricegroup_id *= 1;
536 536
      $pricegroup_id  = undef if !$pricegroup_id;
537 537

  
538
      if ( $::instance_conf->get_order_always_project && !$form->{"globalproject_id"} && ( $form->{type} eq 'sales_order' ) ) {
538
      # force new project, if not set yet
539
      if ($::instance_conf->get_order_always_project && !$form->{"globalproject_id"} && ($form->{type} eq 'sales_order')) {
539 540
        my $new_project = SL::DB::Project->new(
540
          projectnumber => $form->{ordnumber},
541
          description   => $form->{customer},
542
          active        => 1,
543
          project_type_id =>  $::instance_conf->get_project_type_id,
541
          projectnumber     => $form->{ordnumber},
542
          description       => $form->{customer},
543
          active            => 1,
544
          project_type_id   => $::instance_conf->get_project_type_id,
544 545
          project_status_id => $::instance_conf->get_project_status_id,
545
          # id            => $form->{globalproject_id}
546 546
        );
547 547
        $new_project->save;
548 548
        $form->{"globalproject_id"} = $new_project->id;
sql/Pg-upgrade2/project_defaults.sql
1
-- @tag: add_project_defaults 
1
-- @tag: add_project_defaults
2 2
-- @description: Standardprojekttyp und Standardprojectstatus
3
-- @depends: release_3_2_0
3
-- @depends: release_3_3_0
4 4
ALTER TABLE defaults ADD COLUMN order_always_project boolean DEFAULT false;
5 5
ALTER TABLE defaults ADD COLUMN project_status_id integer;
6 6
ALTER TABLE defaults ADD COLUMN project_type_id integer;

Auch abrufbar als: Unified diff