Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b8b112a3

Von Sven Schöling vor mehr als 11 Jahren hinzugefügt

  • ID b8b112a39bd601b0bc717646d78de470631da22a
  • Vorgänger c0931303
  • Nachfolger 2d7e4203

MetaSetup neu generiert

Unterschiede anzeigen:

SL/DB/MetaSetup/PurchaseInvoice.pm
6 6

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

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

  
12
  columns => [
13
    id                      => { type => 'integer', not_null => 1, sequence => 'glid' },
14
    invnumber               => { type => 'text', not_null => 1 },
15
    transdate               => { type => 'date', default => 'now' },
16
    gldate                  => { type => 'date', default => 'now' },
17
    vendor_id               => { type => 'integer' },
18
    taxincluded             => { type => 'boolean', default => 'false' },
19
    amount                  => { type => 'numeric', precision => 5, scale => 15 },
20
    netamount               => { type => 'numeric', precision => 5, scale => 15 },
21
    paid                    => { type => 'numeric', precision => 5, scale => 15 },
22
    datepaid                => { type => 'date' },
23
    duedate                 => { type => 'date' },
24
    invoice                 => { type => 'boolean', default => 'false' },
25
    ordnumber               => { type => 'text' },
26
    notes                   => { type => 'text' },
27
    employee_id             => { type => 'integer' },
28
    quonumber               => { type => 'text' },
29
    intnotes                => { type => 'text' },
30
    department_id           => { type => 'integer' },
31
    itime                   => { type => 'timestamp', default => 'now()' },
32
    mtime                   => { type => 'timestamp' },
33
    shipvia                 => { type => 'text' },
34
    cp_id                   => { type => 'integer' },
35
    language_id             => { type => 'integer' },
36
    payment_id              => { type => 'integer' },
37
    storno                  => { type => 'boolean', default => 'false' },
38
    taxzone_id              => { type => 'integer' },
39
    type                    => { type => 'text' },
40
    orddate                 => { type => 'date' },
41
    quodate                 => { type => 'date' },
42
    globalproject_id        => { type => 'integer' },
43
    transaction_description => { type => 'text' },
44
    storno_id               => { type => 'integer' },
45
    direct_debit            => { type => 'boolean', default => 'false' },
46
    deliverydate            => { type => 'date' },
47
    currency_id             => { type => 'integer', not_null => 1 },
48
  ],
49

  
50
  primary_key_columns => [ 'id' ],
51

  
52
  allow_inline_column_values => 1,
53

  
54
  foreign_keys => [
55
    contact => {
56
      class       => 'SL::DB::Contact',
57
      key_columns => { cp_id => 'cp_id' },
58
    },
59

  
60
    currency => {
61
      class       => 'SL::DB::Currency',
62
      key_columns => { currency_id => 'id' },
63
    },
64

  
65
    department => {
66
      class       => 'SL::DB::Department',
67
      key_columns => { department_id => 'id' },
68
    },
9
__PACKAGE__->meta->table('ap');
10

  
11
__PACKAGE__->meta->columns(
12
  id                      => { type => 'integer', not_null => 1, sequence => 'glid' },
13
  invnumber               => { type => 'text', not_null => 1 },
14
  transdate               => { type => 'date', default => 'now' },
15
  gldate                  => { type => 'date', default => 'now' },
16
  vendor_id               => { type => 'integer' },
17
  taxincluded             => { type => 'boolean', default => 'false' },
18
  amount                  => { type => 'numeric', precision => 5, scale => 15 },
19
  netamount               => { type => 'numeric', precision => 5, scale => 15 },
20
  paid                    => { type => 'numeric', precision => 5, scale => 15 },
21
  datepaid                => { type => 'date' },
22
  duedate                 => { type => 'date' },
23
  invoice                 => { type => 'boolean', default => 'false' },
24
  ordnumber               => { type => 'text' },
25
  notes                   => { type => 'text' },
26
  employee_id             => { type => 'integer' },
27
  quonumber               => { type => 'text' },
28
  intnotes                => { type => 'text' },
29
  department_id           => { type => 'integer' },
30
  itime                   => { type => 'timestamp', default => 'now()' },
31
  mtime                   => { type => 'timestamp' },
32
  shipvia                 => { type => 'text' },
33
  cp_id                   => { type => 'integer' },
34
  language_id             => { type => 'integer' },
35
  payment_id              => { type => 'integer' },
36
  storno                  => { type => 'boolean', default => 'false' },
37
  taxzone_id              => { type => 'integer' },
38
  type                    => { type => 'text' },
39
  orddate                 => { type => 'date' },
40
  quodate                 => { type => 'date' },
41
  globalproject_id        => { type => 'integer' },
42
  transaction_description => { type => 'text' },
43
  storno_id               => { type => 'integer' },
44
  direct_debit            => { type => 'boolean', default => 'false' },
45
  deliverydate            => { type => 'date' },
46
  currency_id             => { type => 'integer', not_null => 1 },
47
);
69 48

  
70
    employee => {
71
      class       => 'SL::DB::Employee',
72
      key_columns => { employee_id => 'id' },
73
    },
49
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
74 50

  
75
    globalproject => {
76
      class       => 'SL::DB::Project',
77
      key_columns => { globalproject_id => 'id' },
78
    },
51
__PACKAGE__->meta->allow_inline_column_values(1);
79 52

  
80
    language => {
81
      class       => 'SL::DB::Language',
82
      key_columns => { language_id => 'id' },
83
    },
53
__PACKAGE__->meta->foreign_keys(
54
  contact => {
55
    class       => 'SL::DB::Contact',
56
    key_columns => { cp_id => 'cp_id' },
57
  },
84 58

  
85
    payment_terms => {
86
      class       => 'SL::DB::PaymentTerm',
87
      key_columns => { payment_id => 'id' },
88
    },
59
  globalproject => {
60
    class       => 'SL::DB::Project',
61
    key_columns => { globalproject_id => 'id' },
62
  },
89 63

  
90
    storno_obj => {
91
      class       => 'SL::DB::PurchaseInvoice',
92
      key_columns => { storno_id => 'id' },
93
    },
64
  storno_obj => {
65
    class       => 'SL::DB::PurchaseInvoice',
66
    key_columns => { storno_id => 'id' },
67
  },
94 68

  
95
    vendor => {
96
      class       => 'SL::DB::Vendor',
97
      key_columns => { vendor_id => 'id' },
98
    },
99
  ],
69
  vendor => {
70
    class       => 'SL::DB::Vendor',
71
    key_columns => { vendor_id => 'id' },
72
  },
100 73
);
101 74

  
75
# __PACKAGE__->meta->initialize;
76

  
102 77
1;
103 78
;

Auch abrufbar als: Unified diff