Bugzilla – Attachment 72125 Details for
Bug 11897
Stock Rotation for Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11897: DO NOT PUSH: Add stock rotation schema files.
Bug-11897-DO-NOT-PUSH-Add-stock-rotation-schema-fi.patch (text/plain), 9.87 KB, created by
Alex Sassmannshausen
on 2018-02-23 16:03:53 UTC
(
hide
)
Description:
Bug 11897: DO NOT PUSH: Add stock rotation schema files.
Filename:
MIME Type:
Creator:
Alex Sassmannshausen
Created:
2018-02-23 16:03:53 UTC
Size:
9.87 KB
patch
obsolete
>From 19095042aa96520adb2e63ea5cf9227006e8c010 Mon Sep 17 00:00:00 2001 >From: Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com> >Date: Mon, 17 Oct 2016 18:24:16 +0200 >Subject: [PATCH] Bug 11897: DO NOT PUSH: Add stock rotation schema files. > >* Koha/Schema/Result/Branch.pm: New file. >* Koha/Schema/Result/Item.pm: New file. >* Koha/Schema/Result/Stockrotationitem.pm: New file. >* Koha/Schema/Result/Stockrotationrota.pm: New file. >* Koha/Schema/Result/Stockrotationstage.pm: New file. > >Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> >--- > Koha/Schema/Result/Branch.pm | 15 ++++ > Koha/Schema/Result/Item.pm | 20 ++++- > Koha/Schema/Result/Stockrotationitem.pm | 113 ++++++++++++++++++++++++++ > Koha/Schema/Result/Stockrotationrota.pm | 105 ++++++++++++++++++++++++ > Koha/Schema/Result/Stockrotationstage.pm | 134 +++++++++++++++++++++++++++++++ > 5 files changed, 385 insertions(+), 2 deletions(-) > create mode 100644 Koha/Schema/Result/Stockrotationitem.pm > create mode 100644 Koha/Schema/Result/Stockrotationrota.pm > create mode 100644 Koha/Schema/Result/Stockrotationstage.pm > >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index bb571b18de..1f2bcb4c73 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -578,6 +578,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 stockrotationstages >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Stockrotationstage> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "stockrotationstages", >+ "Koha::Schema::Result::Stockrotationstage", >+ { "foreign.branchcode_id" => "self.branchcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 transport_cost_frombranches > > Type: has_many >diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm >index cee25520cc..bc439c7ef8 100644 >--- a/Koha/Schema/Result/Item.pm >+++ b/Koha/Schema/Result/Item.pm >@@ -686,9 +686,24 @@ __PACKAGE__->might_have( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 stockrotationitem > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-18 16:41:12 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CrNXvpDUvvcuPZK2Gfzs/Q >+Type: might_have >+ >+Related object: L<Koha::Schema::Result::Stockrotationitem> >+ >+=cut >+ >+__PACKAGE__->might_have( >+ "stockrotationitem", >+ "Koha::Schema::Result::Stockrotationitem", >+ { "foreign.itemnumber_id" => "self.itemnumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-12-12 17:02:24 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oo/Eubwpc1tcaGAO9Oja1A > > __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); > >@@ -713,4 +728,5 @@ sub effective_itemtype { > } > } > >+# You can replace this text with custom code or comments, and it will be preserved on regeneration > 1; >diff --git a/Koha/Schema/Result/Stockrotationitem.pm b/Koha/Schema/Result/Stockrotationitem.pm >new file mode 100644 >index 0000000000..7963601fa0 >--- /dev/null >+++ b/Koha/Schema/Result/Stockrotationitem.pm >@@ -0,0 +1,113 @@ >+use utf8; >+package Koha::Schema::Result::Stockrotationitem; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::Stockrotationitem >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<stockrotationitems> >+ >+=cut >+ >+__PACKAGE__->table("stockrotationitems"); >+ >+=head1 ACCESSORS >+ >+=head2 itemnumber_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+=head2 stage_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+=head2 indemand >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 0 >+ >+=head2 fresh >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "itemnumber_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "stage_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "indemand", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "fresh", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</itemnumber_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("itemnumber_id"); >+ >+=head1 RELATIONS >+ >+=head2 itemnumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Item> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "itemnumber", >+ "Koha::Schema::Result::Item", >+ { itemnumber => "itemnumber_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+=head2 stage >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Stockrotationstage> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "stage", >+ "Koha::Schema::Result::Stockrotationstage", >+ { stage_id => "stage_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-04-04 12:16:10 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5IDh4gVR3uzLEdUPBfsHTA >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/Stockrotationrota.pm b/Koha/Schema/Result/Stockrotationrota.pm >new file mode 100644 >index 0000000000..46661c635f >--- /dev/null >+++ b/Koha/Schema/Result/Stockrotationrota.pm >@@ -0,0 +1,105 @@ >+use utf8; >+package Koha::Schema::Result::Stockrotationrota; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::Stockrotationrota >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<stockrotationrotas> >+ >+=cut >+ >+__PACKAGE__->table("stockrotationrotas"); >+ >+=head1 ACCESSORS >+ >+=head2 rota_id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 title >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 100 >+ >+=head2 description >+ >+ data_type: 'text' >+ is_nullable: 0 >+ >+=head2 cyclical >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 0 >+ >+=head2 active >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "rota_id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "title", >+ { data_type => "varchar", is_nullable => 0, size => 100 }, >+ "description", >+ { data_type => "text", is_nullable => 0 }, >+ "cyclical", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "active", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</rota_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("rota_id"); >+ >+=head1 RELATIONS >+ >+=head2 stockrotationstages >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Stockrotationstage> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "stockrotationstages", >+ "Koha::Schema::Result::Stockrotationstage", >+ { "foreign.rota_id" => "self.rota_id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-17 16:18:21 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gglRP/Dh1RIu9eH834lStA >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/Stockrotationstage.pm b/Koha/Schema/Result/Stockrotationstage.pm >new file mode 100644 >index 0000000000..5ae86d6bf0 >--- /dev/null >+++ b/Koha/Schema/Result/Stockrotationstage.pm >@@ -0,0 +1,134 @@ >+use utf8; >+package Koha::Schema::Result::Stockrotationstage; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::Stockrotationstage >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<stockrotationstages> >+ >+=cut >+ >+__PACKAGE__->table("stockrotationstages"); >+ >+=head1 ACCESSORS >+ >+=head2 stage_id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 position >+ >+ data_type: 'integer' >+ is_nullable: 0 >+ >+=head2 rota_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+=head2 branchcode_id >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ size: 10 >+ >+=head2 duration >+ >+ data_type: 'integer' >+ default_value: 4 >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "stage_id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "position", >+ { data_type => "integer", is_nullable => 0 }, >+ "rota_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "branchcode_id", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, >+ "duration", >+ { data_type => "integer", default_value => 4, is_nullable => 0 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</stage_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("stage_id"); >+ >+=head1 RELATIONS >+ >+=head2 branchcode >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "branchcode", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "branchcode_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+=head2 rota >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Stockrotationrota> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "rota", >+ "Koha::Schema::Result::Stockrotationrota", >+ { rota_id => "rota_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+=head2 stockrotationitems >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Stockrotationitem> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "stockrotationitems", >+ "Koha::Schema::Result::Stockrotationitem", >+ { "foreign.stage_id" => "self.stage_id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-11-07 11:33:00 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zxUwd0UdMRN03yuSlf3RmA >+ >+1; >-- >2.13.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11897
:
25887
|
58207
|
58208
|
58209
|
58210
|
58211
|
58212
|
58213
|
58214
|
58215
|
58216
|
58217
|
58218
|
58219
|
58280
|
58281
|
58687
|
58692
|
58693
|
58694
|
58695
|
58696
|
60175
|
60715
|
61825
|
61826
|
61827
|
61828
|
61829
|
61830
|
61831
|
61832
|
61833
|
61834
|
61835
|
61836
|
61837
|
61838
|
61839
|
61885
|
62730
|
62750
|
62751
|
62752
|
62753
|
62754
|
62755
|
62756
|
62757
|
62758
|
62759
|
62760
|
62761
|
62762
|
62763
|
62764
|
62765
|
62766
|
62767
|
63063
|
63064
|
63065
|
63066
|
63067
|
63068
|
63069
|
63070
|
63071
|
63072
|
63073
|
63074
|
63075
|
63076
|
63077
|
63078
|
63079
|
63080
|
63114
|
64850
|
64851
|
65715
|
65716
|
65717
|
65718
|
65719
|
65720
|
65721
|
65722
|
65723
|
65724
|
65725
|
65726
|
65727
|
65728
|
65729
|
65730
|
65731
|
65732
|
65733
|
65734
|
65735
|
65736
|
65737
|
65738
|
65739
|
65740
|
65741
|
65742
|
65743
|
65744
|
65745
|
65746
|
65747
|
65748
|
65749
|
65750
|
65751
|
65752
|
65753
|
65754
|
65755
|
65756
|
65757
|
65758
|
66381
|
70496
|
70497
|
70498
|
70499
|
70500
|
70501
|
70502
|
70503
|
70504
|
70505
|
70506
|
70507
|
70508
|
70509
|
70510
|
70511
|
70512
|
70513
|
70514
|
70515
|
70516
|
70517
|
70518
|
70519
|
70520
|
70521
|
70522
|
70523
|
70524
|
72124
|
72125
|
72126
|
72127
|
72128
|
74003
|
74004
|
74005
|
74006
|
74007
|
74008
|
74010
|
74011
|
74012
|
74013
|
74014
|
74015
|
74016
|
74017
|
74197
|
74198
|
74199
|
74200
|
74201
|
74202
|
74203
|
74204
|
74205
|
74206
|
74319
|
74320
|
74360
|
74459
|
74460
|
74461
|
74462
|
74463
|
74464
|
74465
|
74466
|
74467
|
74468
|
74469
|
74470
|
75409
|
75410
|
75411
|
75412
|
75413
|
75414
|
75415
|
75416
|
75417
|
75418
|
75419
|
75420
|
76121
|
76122
|
76123
|
76124
|
76125
|
76126
|
76127
|
76128
|
76129
|
76130
|
76131
|
76132
|
76133
|
76134
|
76135
|
76144
|
76706
|
76707
|
76708
|
76709
|
76710
|
77623
|
77624
|
77625
|
77626
|
78387
|
78388
|
78389
|
78390
|
78391
|
78392
|
78393
|
78394
|
78404
|
78405
|
78406
|
78407
|
78408
|
79040
|
79041
|
79042
|
79043
|
79044
|
79738
|
79739
|
79740
|
79741
|
79742
|
79746
|
79747
|
79748
|
79749
|
79750
|
79964
|
79965
|
79966
|
79967
|
79968
|
79969
|
79970
|
79971
|
79972
|
79973
|
79974
|
79975
|
80068
|
80087
|
80088
|
80089
|
80090
|
80091
|
80092
|
80093
|
80094
|
80095
|
80096
|
80097
|
80098
|
80099
|
80100
|
80118
|
80260
|
80261
|
80262
|
80263
|
80264
|
80265
|
80266
|
80267
|
80268
|
80269
|
80270
|
80271
|
80272
|
80273
|
80274
|
80275
|
80289
|
80298
|
80299
|
80300