Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 373cec3f

Von Moritz Bunkus vor fast 14 Jahren hinzugefügt

  • ID 373cec3fe35cfbce3846ab41cc285d7e4a004f97
  • Vorgänger 50418558
  • Nachfolger 6834acd9

Eines der zwei Models für acc_trans gelöscht

Unterschiede anzeigen:

SL/DB/AccTrans.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::AccTrans;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::AccTrans;
9

  
10
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11
__PACKAGE__->meta->make_manager_class;
12

  
13
1;
SL/DB/Helper/ALL.pm
2 2

  
3 3
use strict;
4 4

  
5
use SL::DB::AccTrans;
6 5
use SL::DB::AccTransaction;
7 6
use SL::DB::Assembly;
8 7
use SL::DB::AuditTrail;
SL/DB/Invoice.pm
13 13
use SL::DB::Helper::LinkedRecords;
14 14
use SL::DB::Helper::PriceTaxCalculator;
15 15
use SL::DB::Helper::TransNumberGenerator;
16
use SL::DB::AccTransaction;
16 17
use SL::DB::Employee;
17 18

  
18 19
__PACKAGE__->meta->add_relationship(
......
155 156

  
156 157
  while (my ($chart_id, $spec) = each %{ $entries }) {
157 158
    $spec = { taxkey => 0, amount => $spec } unless ref $spec;
158
    SL::DB::AccTrans->new(trans_id   => $self->id,
159
                          chart_id   => $chart_id,
160
                          amount     => $spec->{amount},
161
                          taxkey     => $spec->{taxkey},
162
                          project_id => $self->globalproject_id,
163
                          transdate  => $self->transdate)->save;
159
    SL::DB::AccTransaction->new(trans_id   => $self->id,
160
                                chart_id   => $chart_id,
161
                                amount     => $spec->{amount},
162
                                taxkey     => $spec->{taxkey},
163
                                project_id => $self->globalproject_id,
164
                                transdate  => $self->transdate)->save;
164 165
  }
165 166
}
166 167

  
SL/DB/MetaSetup/AccTrans.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::AccTrans;
4

  
5
use strict;
6

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

  
9
__PACKAGE__->meta->setup(
10
  table   => 'acc_trans',
11

  
12
  columns => [
13
    acc_trans_id   => { type => 'bigint', sequence => 'acc_trans_id_seq' },
14
    trans_id       => { type => 'integer', not_null => 1 },
15
    chart_id       => { type => 'integer', not_null => 1 },
16
    amount         => { type => 'numeric', precision => 5, scale => 15 },
17
    transdate      => { type => 'date', default => 'now' },
18
    gldate         => { type => 'date', default => 'now' },
19
    source         => { type => 'text' },
20
    cleared        => { type => 'boolean', default => 'false' },
21
    fx_transaction => { type => 'boolean', default => 'false' },
22
    ob_transaction => { type => 'boolean', default => 'false' },
23
    cb_transaction => { type => 'boolean', default => 'false' },
24
    project_id     => { type => 'integer' },
25
    memo           => { type => 'text' },
26
    taxkey         => { type => 'integer' },
27
    itime          => { type => 'timestamp', default => 'now()' },
28
    mtime          => { type => 'timestamp' },
29
    id             => { type => 'integer', not_null => 1, sequence => 'acc_trans_id_seq1' },
30
  ],
31

  
32
  primary_key_columns => [ 'id' ],
33

  
34
  allow_inline_column_values => 1,
35

  
36
  foreign_keys => [
37
    chart => {
38
      class       => 'SL::DB::Chart',
39
      key_columns => { chart_id => 'id' },
40
    },
41

  
42
    project => {
43
      class       => 'SL::DB::Project',
44
      key_columns => { project_id => 'id' },
45
    },
46
  ],
47
);
48

  
49
1;
50
;

Auch abrufbar als: Unified diff