Bug 20434: Update UNIMARC framework - auth (SAUTTIT)
[koha.git] / Koha / Schema / Result / Aqinvoice.pm
blobfe1f8f265e0735edda1a4f09f77c14425dfcf613
1 use utf8;
2 package Koha::Schema::Result::Aqinvoice;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Aqinvoice
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<aqinvoices>
20 =cut
22 __PACKAGE__->table("aqinvoices");
24 =head1 ACCESSORS
26 =head2 invoiceid
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 invoicenumber
34 data_type: 'longtext'
35 is_nullable: 0
37 =head2 booksellerid
39 data_type: 'integer'
40 is_foreign_key: 1
41 is_nullable: 0
43 =head2 shipmentdate
45 data_type: 'date'
46 datetime_undef_if_invalid: 1
47 is_nullable: 1
49 =head2 billingdate
51 data_type: 'date'
52 datetime_undef_if_invalid: 1
53 is_nullable: 1
55 =head2 closedate
57 data_type: 'date'
58 datetime_undef_if_invalid: 1
59 is_nullable: 1
61 =head2 shipmentcost
63 data_type: 'decimal'
64 is_nullable: 1
65 size: [28,6]
67 =head2 shipmentcost_budgetid
69 data_type: 'integer'
70 is_foreign_key: 1
71 is_nullable: 1
73 =head2 message_id
75 data_type: 'integer'
76 is_foreign_key: 1
77 is_nullable: 1
79 =cut
81 __PACKAGE__->add_columns(
82 "invoiceid",
83 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
84 "invoicenumber",
85 { data_type => "longtext", is_nullable => 0 },
86 "booksellerid",
87 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
88 "shipmentdate",
89 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
90 "billingdate",
91 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
92 "closedate",
93 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
94 "shipmentcost",
95 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
96 "shipmentcost_budgetid",
97 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
98 "message_id",
99 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
102 =head1 PRIMARY KEY
104 =over 4
106 =item * L</invoiceid>
108 =back
110 =cut
112 __PACKAGE__->set_primary_key("invoiceid");
114 =head1 RELATIONS
116 =head2 aqinvoice_adjustments
118 Type: has_many
120 Related object: L<Koha::Schema::Result::AqinvoiceAdjustment>
122 =cut
124 __PACKAGE__->has_many(
125 "aqinvoice_adjustments",
126 "Koha::Schema::Result::AqinvoiceAdjustment",
127 { "foreign.invoiceid" => "self.invoiceid" },
128 { cascade_copy => 0, cascade_delete => 0 },
131 =head2 aqorders
133 Type: has_many
135 Related object: L<Koha::Schema::Result::Aqorder>
137 =cut
139 __PACKAGE__->has_many(
140 "aqorders",
141 "Koha::Schema::Result::Aqorder",
142 { "foreign.invoiceid" => "self.invoiceid" },
143 { cascade_copy => 0, cascade_delete => 0 },
146 =head2 booksellerid
148 Type: belongs_to
150 Related object: L<Koha::Schema::Result::Aqbookseller>
152 =cut
154 __PACKAGE__->belongs_to(
155 "booksellerid",
156 "Koha::Schema::Result::Aqbookseller",
157 { id => "booksellerid" },
158 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
161 =head2 message
163 Type: belongs_to
165 Related object: L<Koha::Schema::Result::EdifactMessage>
167 =cut
169 __PACKAGE__->belongs_to(
170 "message",
171 "Koha::Schema::Result::EdifactMessage",
172 { id => "message_id" },
174 is_deferrable => 1,
175 join_type => "LEFT",
176 on_delete => "SET NULL",
177 on_update => "RESTRICT",
181 =head2 shipmentcost_budgetid
183 Type: belongs_to
185 Related object: L<Koha::Schema::Result::Aqbudget>
187 =cut
189 __PACKAGE__->belongs_to(
190 "shipmentcost_budgetid",
191 "Koha::Schema::Result::Aqbudget",
192 { budget_id => "shipmentcost_budgetid" },
194 is_deferrable => 1,
195 join_type => "LEFT",
196 on_delete => "SET NULL",
197 on_update => "CASCADE",
202 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-07-16 13:50:45
203 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mpdxTbkz/8WInG5Wp4q7Ug
205 sub koha_object_class {
206 'Koha::Acquisition::Invoice';
208 sub koha_objects_class {
209 'Koha::Acquisition::Invoices';