Bug 18639: DBRev 18.06.00.023
[koha_ffzg] / Koha / Schema / Result / Aqorder.pm
index 0379a90..f0dca06 100644 (file)
@@ -49,8 +49,9 @@ __PACKAGE__->table("aqorders");
 =head2 currency
 
   data_type: 'varchar'
+  is_foreign_key: 1
   is_nullable: 1
-  size: 3
+  size: 10
 
 =head2 listprice
 
@@ -58,12 +59,6 @@ __PACKAGE__->table("aqorders");
   is_nullable: 1
   size: [28,6]
 
-=head2 totalamount
-
-  data_type: 'decimal'
-  is_nullable: 1
-  size: [28,6]
-
 =head2 datereceived
 
   data_type: 'date'
@@ -88,12 +83,30 @@ __PACKAGE__->table("aqorders");
   is_nullable: 1
   size: [28,6]
 
+=head2 unitprice_tax_excluded
+
+  data_type: 'decimal'
+  is_nullable: 1
+  size: [28,6]
+
+=head2 unitprice_tax_included
+
+  data_type: 'decimal'
+  is_nullable: 1
+  size: [28,6]
+
 =head2 quantityreceived
 
   data_type: 'smallint'
   default_value: 0
   is_nullable: 0
 
+=head2 created_by
+
+  data_type: 'integer'
+  is_foreign_key: 1
+  is_nullable: 1
+
 =head2 datecancellationprinted
 
   data_type: 'date'
@@ -102,27 +115,22 @@ __PACKAGE__->table("aqorders");
 
 =head2 cancellationreason
 
-  data_type: 'text'
+  data_type: 'mediumtext'
   is_nullable: 1
 
 =head2 order_internalnote
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 order_vendornote
 
-  data_type: 'mediumtext'
-  is_nullable: 1
-
-=head2 supplierreference
-
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 purchaseordernumber
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 basketno
@@ -144,18 +152,78 @@ __PACKAGE__->table("aqorders");
   is_nullable: 1
   size: [13,2]
 
+=head2 replacementprice
+
+  data_type: 'decimal'
+  is_nullable: 1
+  size: [28,6]
+
+=head2 rrp_tax_excluded
+
+  data_type: 'decimal'
+  is_nullable: 1
+  size: [28,6]
+
+=head2 rrp_tax_included
+
+  data_type: 'decimal'
+  is_nullable: 1
+  size: [28,6]
+
 =head2 ecost
 
   data_type: 'decimal'
   is_nullable: 1
   size: [13,2]
 
-=head2 gstrate
+=head2 ecost_tax_excluded
+
+  data_type: 'decimal'
+  is_nullable: 1
+  size: [28,6]
+
+=head2 ecost_tax_included
+
+  data_type: 'decimal'
+  is_nullable: 1
+  size: [28,6]
+
+=head2 tax_rate_bak
 
   data_type: 'decimal'
   is_nullable: 1
   size: [6,4]
 
+=head2 tax_rate_on_ordering
+
+  data_type: 'decimal'
+  is_nullable: 1
+  size: [6,4]
+
+=head2 tax_rate_on_receiving
+
+  data_type: 'decimal'
+  is_nullable: 1
+  size: [6,4]
+
+=head2 tax_value_bak
+
+  data_type: 'decimal'
+  is_nullable: 1
+  size: [28,6]
+
+=head2 tax_value_on_ordering
+
+  data_type: 'decimal'
+  is_nullable: 1
+  size: [28,6]
+
+=head2 tax_value_on_receiving
+
+  data_type: 'decimal'
+  is_nullable: 1
+  size: [28,6]
+
 =head2 discount
 
   data_type: 'float'
@@ -165,11 +233,7 @@ __PACKAGE__->table("aqorders");
 =head2 budget_id
 
   data_type: 'integer'
-  is_nullable: 0
-
-=head2 budgetgroup_id
-
-  data_type: 'integer'
+  is_foreign_key: 1
   is_nullable: 0
 
 =head2 budgetdate
@@ -237,6 +301,29 @@ __PACKAGE__->table("aqorders");
   is_nullable: 1
   size: 16
 
+=head2 line_item_id
+
+  data_type: 'varchar'
+  is_nullable: 1
+  size: 35
+
+=head2 suppliers_reference_number
+
+  data_type: 'varchar'
+  is_nullable: 1
+  size: 35
+
+=head2 suppliers_reference_qualifier
+
+  data_type: 'varchar'
+  is_nullable: 1
+  size: 3
+
+=head2 suppliers_report
+
+  data_type: 'mediumtext'
+  is_nullable: 1
+
 =cut
 
 __PACKAGE__->add_columns(
@@ -249,11 +336,9 @@ __PACKAGE__->add_columns(
   "quantity",
   { data_type => "smallint", is_nullable => 1 },
   "currency",
-  { data_type => "varchar", is_nullable => 1, size => 3 },
+  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
   "listprice",
   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
-  "totalamount",
-  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
   "datereceived",
   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
   "invoiceid",
@@ -262,20 +347,24 @@ __PACKAGE__->add_columns(
   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
   "unitprice",
   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
+  "unitprice_tax_excluded",
+  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
+  "unitprice_tax_included",
+  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
   "quantityreceived",
   { data_type => "smallint", default_value => 0, is_nullable => 0 },
+  "created_by",
+  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
   "datecancellationprinted",
   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
   "cancellationreason",
-  { data_type => "text", is_nullable => 1 },
-  "order_internalnote",
   { data_type => "mediumtext", is_nullable => 1 },
+  "order_internalnote",
+  { data_type => "longtext", is_nullable => 1 },
   "order_vendornote",
-  { data_type => "mediumtext", is_nullable => 1 },
-  "supplierreference",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "purchaseordernumber",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "basketno",
   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
   "timestamp",
@@ -287,16 +376,34 @@ __PACKAGE__->add_columns(
   },
   "rrp",
   { data_type => "decimal", is_nullable => 1, size => [13, 2] },
+  "replacementprice",
+  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
+  "rrp_tax_excluded",
+  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
+  "rrp_tax_included",
+  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
   "ecost",
   { data_type => "decimal", is_nullable => 1, size => [13, 2] },
-  "gstrate",
+  "ecost_tax_excluded",
+  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
+  "ecost_tax_included",
+  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
+  "tax_rate_bak",
+  { data_type => "decimal", is_nullable => 1, size => [6, 4] },
+  "tax_rate_on_ordering",
+  { data_type => "decimal", is_nullable => 1, size => [6, 4] },
+  "tax_rate_on_receiving",
   { data_type => "decimal", is_nullable => 1, size => [6, 4] },
+  "tax_value_bak",
+  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
+  "tax_value_on_ordering",
+  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
+  "tax_value_on_receiving",
+  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
   "discount",
   { data_type => "float", is_nullable => 1, size => [6, 4] },
   "budget_id",
-  { data_type => "integer", is_nullable => 0 },
-  "budgetgroup_id",
-  { data_type => "integer", is_nullable => 0 },
+  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
   "budgetdate",
   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
   "sort1",
@@ -324,6 +431,14 @@ __PACKAGE__->add_columns(
     is_nullable => 1,
     size => 16,
   },
+  "line_item_id",
+  { data_type => "varchar", is_nullable => 1, size => 35 },
+  "suppliers_reference_number",
+  { data_type => "varchar", is_nullable => 1, size => 35 },
+  "suppliers_reference_qualifier",
+  { data_type => "varchar", is_nullable => 1, size => 3 },
+  "suppliers_report",
+  { data_type => "mediumtext", is_nullable => 1 },
 );
 
 =head1 PRIMARY KEY
@@ -340,6 +455,21 @@ __PACKAGE__->set_primary_key("ordernumber");
 
 =head1 RELATIONS
 
+=head2 aqorder_users
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::AqorderUser>
+
+=cut
+
+__PACKAGE__->has_many(
+  "aqorder_users",
+  "Koha::Schema::Result::AqorderUser",
+  { "foreign.ordernumber" => "self.ordernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
 =head2 aqorders_items
 
 Type: has_many
@@ -425,6 +555,61 @@ __PACKAGE__->belongs_to(
   },
 );
 
+=head2 budget
+
+Type: belongs_to
+
+Related object: L<Koha::Schema::Result::Aqbudget>
+
+=cut
+
+__PACKAGE__->belongs_to(
+  "budget",
+  "Koha::Schema::Result::Aqbudget",
+  { budget_id => "budget_id" },
+  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
+);
+
+=head2 created_by
+
+Type: belongs_to
+
+Related object: L<Koha::Schema::Result::Borrower>
+
+=cut
+
+__PACKAGE__->belongs_to(
+  "created_by",
+  "Koha::Schema::Result::Borrower",
+  { borrowernumber => "created_by" },
+  {
+    is_deferrable => 1,
+    join_type     => "LEFT",
+    on_delete     => "SET NULL",
+    on_update     => "CASCADE",
+  },
+);
+
+=head2 currency
+
+Type: belongs_to
+
+Related object: L<Koha::Schema::Result::Currency>
+
+=cut
+
+__PACKAGE__->belongs_to(
+  "currency",
+  "Koha::Schema::Result::Currency",
+  { currency => "currency" },
+  {
+    is_deferrable => 1,
+    join_type     => "LEFT",
+    on_delete     => "SET NULL",
+    on_update     => "SET NULL",
+  },
+);
+
 =head2 invoiceid
 
 Type: belongs_to
@@ -465,10 +650,20 @@ __PACKAGE__->belongs_to(
   },
 );
 
+=head2 borrowernumbers
+
+Type: many_to_many
+
+Composing rels: L</aqorder_users> -> borrowernumber
+
+=cut
+
+__PACKAGE__->many_to_many("borrowernumbers", "aqorder_users", "borrowernumber");
+
 
-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-10-30 01:04:01
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M+R6T+KIk4lqzdYjbYvg9w
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-08-31 11:51:37
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GQEXetlivZm7buQohl8m4A
 
 
-# You can replace this text with custom content, and it will be preserved on regeneration
+# You can replace this text with custom code or comments, and it will be preserved on regeneration
 1;